Question: second picture is the example similar to that will be appreciated python I try my best to zoom in For this Assignment you will practice

 second picture is the example similar to that will be appreciated

python I try my best to zoom in For this Assignment you

second picture is the example similar to that will be appreciated

python

will practice some string and list methods and functions, as well as

reading in from a file and writing out to another file Problem:

I try my best to zoom in

For this Assignment you will practice some string and list methods and functions, as well as reading in from a file and writing out to another file Problem: Write a program that prompts the user a for their name, and the name of a file to read in a sentence from. Then it will show the user various fun things done with the sentence (displayed to the screen), and finally write out all of the fun displays to a text file named "funwithstrings.txt" - with the users name at the top of the file and then each fun display numbered in order First, write the algorithm to solve EVERY step of the above problem in human readable terms. Re- member to mention initializing any variables needed, that a file has to be read in, that a file has to be written out to, and what has to be displayed. Algorithms do not mention specific methods Python uses, just something like "Display the sentence in title case". Every programming language would do that in a different way. 9. Some additional string fun (make sure to use a comment to explain what you did to me) and tell the user in the output Make sure the program is user friendly. Ask the user for his/her name, introduce the program, prompt for a file o read in, prompt for a vowel, explain what each numbered item is the user is see- ing on the screen, tell them the name of the file that you wrote the info out to also, thank them for using your program, cto: Make sure you have heading comments and comments throughout the code. *MAKE SURE TO SUBMIT BOTH THE PYTHON FILE AND TEXT FILE WITH ORIGI NAL SENTENCE Tip-Number cach output display as numbered below. The program must store the words from the sentence in a list to be able to do 4 and 7 Output should be very user friendly and tell the user what it is displaying each time. Include at a minimum (you can do more if you want): 1. Sentence in title case 2. Sentence in upper case 3. Number of characters in the sentence 4. Number of words in the sentence 5. Number of times a particular letter shows up in the sentence 6. Ask the user to enter a vowel other than e, then swap alle's in the sentence with that vowel. 7. A new word by concatenating the first word and last word 8. Display the sentence backwards filreadandwrite.py - \Users\mcucc OneDrive\Desktop\225\filreadandwrite.py (3.9.1) File Edit Format Run Options Window Help #define main function def main(): #create constant to store weeks in a year weeks = 52 #declare and inialize string variables for fname, Iname #and real for weekly and annual salary firstName = lastName = fileName annual = weekly = 0.0 #desplay intro print("welcome to my weekly pay calculator!") #promp user for file name fileName = input("enter the naem of the file (with .txt): ") #open file to read data from with open (fileName, "") as infile: firstname, lastname = infile.readline()split() linel infile.readline () #this will read in line 1 only "michael cuccia' annual = float(infile.readline()) #this will read in the next line "100 split the name into the 2 variables firstName, lastName = linel.split() #convert annual to a number tannual = float (annual) +10000000000 #claculate the weekly salary weekly = annual / weeks print("hi (firstName), your weekly salary is stweekly:, .28] ") #write out the weekly salary to a text file #open file to write info to #w wil create the file if it does not exist yet #it will overwrite the file if it does exist with open ("weekly.txt", "W") as outfile: #.write() method only takes a string argument only outfile.write(I "weekly: (weekly:, .2E) ") outfile.write("bye") print("hi (firstName), your weekly salary is siweekly:,.2)", file = outfi print("bye", file = outfile) Type here to search Elt C N HD 1080, File Edit Format Run Options Window Help #define main function def main(): #create constant to store weeks in a year weeks = 52 #declare and inialize string variables for fname, Iname #and real for weekly and annual salary firstName = lastName = fileName = "" annual = weekly = 0.0 #desplay intro print("welcome to my weekly pay calculator!") #promp user for file name fileName = input ("enter the naem of the file (with .txt): ") #open file to read data from with open (FileName, "r") as infile: #firstname, lastname = infile.readline ().split() linel infile.readline () #this will read in line 1 only "michael cuccia annual = float(infile.readline () #this will read in the next line "100 #split the name into the 2 variables firstName, lastName linel.split() #convert annual to a number Hannual = float (annual) +10000000000 #claculate the weekly salary weekly = annual / weeks print (f"hi firstName), your weekly salary is $iweekly:, .28] ") #write out the weekly salary to a text file #open file to write info to #w wll create the file if it does not exist yet #it will overwrite the file if it does exist with open ("weekly-txt", "w") as outfile: #.write() method only takes a string argument only outfile.write("weekly: [weekly:, .21} ") outfile.write("bye") print (f"hi (firstName), your weekly salary is ${weekly:,.2)", file = outi print("bye", file = outfile) Instructions Fun With Strings For this Assignment you will practice some string and list methods and functions, as well as reading in from a file and writing out to another file. Problem: Write a program that prompts the user a for their name, and the name of a file to read in a sentence from. Then it will show the user various fun things done with the sentence (displayed to the screen), and finally write out all of the fun displays to a text file named "funwithstrings.txt" - with the users name at the top of the file and then each fun display numbered in order First, write the algorithm to solve EVERY step of the above problem in human readable terms. Remember to mention initializing any variables needed that a file has to be read in that a file has to be written out to, and what has to be displayed. Algorithms do not mention specific methods Python uses just something like "Display the sentence in title case" Every programming language would do that in a different way Tip-Number each output display as numbered below. The program must store the words from the sentence in a list to be able to do 4 and 7 Output should be very user friendly and tell the user what it is displaying each time Include at a minimum (you can do more if you want) 1. Sentence in title case 2. Sentence in upper case 3. Number of characters in the sentence 4. Number of words in the sentence 5 Number of times a particular letter shows up in the sentence 6. Ask the user to enter a vowel other than then swap alle's in the sentence with that vowel 7. A new word by concatenating the first word and last word 8 Display the sentence backwards 9. Some additional string fun (make sure to use a comment to explain what you did to me) and tell the user in the output Make sure the program is user friendlyAsk the user for his/her name, introduce the program, prompt for a file o read in prompt for a vowel, explain what each numbered item is the user is seeing on the screen tell them the name of the file that you wrote the info out to also thank them for using your program etc. Make sure you have heading comments and comments throughout the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!