Need Help ?

Home / Expert Answers / Other / Description Objectives Doing more with lists/dictionaries and introducing files. NOTE: This lab is

Description Objectives Doing more with lists/dictionaries and introducing files. NOTE: This lab is ...


Description Objectives Doing more with lists/dictionaries and introducing files. NOTE: This lab is actually 2 separate programs. Overview This will extends the previous lab to allow the user to display the resulting story with several potential "dynamic" modifications to their input. Instructions First, Create a file called story_template.txt which contains the strings (and placeholders) for you story template (as created in the previous lab). Program 1: (readinput.py) Create a Python program which reads in a set of words from the user (as before), but this time writes them to a called: story_dictionary.txt NOTE: This is essentially the exact same thing as in the previous lab, but only writing the data out to a file. Program 2: (generatestory.py) Your program should read a "story template" and "word dictionary" from input files and write the output to the screen. The filenames and "input conversion type" (see below) should be read from the "command line" when the program is launched. For example: LAB4.py 1 story_template.txt input_words.txt If the user launched the program without the correct parameters, a usage message should be shown (such as): USAGE: LAB4.py CONVERSION: 1 for UPPER CASE, 2 for LOWERCASE, etc... Conversion Types (of just your input words, not the whole story): All UPPER CASE All lower case All Capitalized Case As entered (i.e., no changes) NOTES: For more information on strings: See http://www.diveinto.org/python3/strings.html And specifically http://www.diveinto.org/python3/strings.html#common-string-methods for manipulations you can perform on strings. For more information on files: Writing: http://www.diveintopython3.net/files.html#writing Reading one line at a time: http://www.diveintopython3.net/files.html#for Example input files: Story file: I have a dog named {PETNAME} who barks a lot and loves to {ACTIVITY} every day. Words dictionary: PETNAME=Spot ACTIVITY=Bark check the LAB3.zip frist and see if its match the same lab or not



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp