(Attached is a "starter sample". Notethat only reading the file is shown, see the "Notes" at the bottom.)
Doing more with lists/dictionaries and introducing files.
This will extends the previous lab to allow the user to display the resulting story with several potential "dynamic" modifications to their input.
Your program should read a "story template" from a file and write the output to a file.
The filenames for the input and output should be read from the "command line" when the program is launched.
For example: LAB4.pystory_template.txtoutput_file.txt
Prompt the user for at least 10 words or phrases and store each result in a Python "Dictionary" within the program.
You should have a separate function dedicated to this task
AFTER entering all of the words, ask the user how they would like their own words to show in the story (how you present the prompt is up to you):
All UPPER CASE
All lower case
All Capitalized Case
As entered (i.e., no changes)
For each of the above choices, modify user entered terms in the dictionary indicated. Call your displayStory() function with story template and the user entered dictionary.
For example: displayStory(storyTemplate, userDictionary)
The results should be written to the screen and to the output file.
Remember: You can make up your own story, or just grab a short piece of text from somewhere and edit it into your program, deleting the words you intend on filling in with your own. But In the interest of Academic Integrity, be sure to cite the source of any text you choose to grab!