Question
Please code it in python. Fun With Strings For this Assignment you will practice some string and list methods and functions, as well as reading
Please code it in python.
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 e, then swap all es 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 friendly. Ask the user for his/her name, introduce the program, prompt for a file to 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started