subject

Python 3 madlibs read file--slice string--take inputtext input included at very bottomno third party ! the goal of this assignment is to create a version of game mad libs. given a text file with the story, the program will ask the user to fill in the blanks. the program will then show the user the final story. as part of this project, you will be required write your own story. word template gamesmad libs are a type of word template game. a story is written with multiple blank spaces. the game has two players. one player asks the other for words to fill in the blanks. the player suggesting words does not know what the story is or what the words are for. once all the blanks have been filled in, the story is read. since the person suggesting the words does not know the context, this will lead to a funny but nonsensical story. an example of a real mad lib game is provided at the end of the instructions. the text files we are using are based on example 1 and example 2.programming projectyou will develop a python program that reads from a text file and fills in the blanks for a story. the first thing the program needs to do it ask for the text file containing the story. the program will then read the file. while the file is being read, the program will encounter words that start with a square bracket [. a word that starts with a square bracket is a blank. it needs to be filled in by the user. between the [ and ] in the string is what type of word to ask the user for. for example, if the program encounters [verb-ending-in-ing] then it should ask " give a verb ending in ing". the input from the user is then read to fill in the blank. once the entire store is complete, it will be printed out for the user. the following additional guidelines must be followed: only print the story once all blanks have been filled in. if the type of word being asked for starts with a vowel ask " give an …"if the type of word being asked for does not start with a vowel as " give a …"users may give multiple word answers. your program should not crash if the file cannot be read. it should exit gracefully. the blank space may have punctuation, be sure this is correctly printed in the story. your program must work with the three example files provided. text file 1: a vacation is when you take a trip to some [adjective] place with your [adjective] family. usually you go to some place that is near a/an [noun] or up on a/an [noun]. a good vacation place is one where you can ride [plural-noun] or play [game] or go hunting for [plural-noun]. i like to spend my time [verb-ending-in-ing] or [verb-ending-in-ing]. when parent go on a vacation, they spend their time eating three [plural-noun] a day, and fathers play golf, and mothers sit around [verb-ending-in-ing]. last summer, my little brother fell in a/an [noun] and got poison [plant] all over his [part-of-the-body]. my family is going to go to (the) [place], and i will practice [verb-ending-in-ing]. parents need vacations more than kids because parents are always very [adjective] and because they have to work [number] hours every day all year making enough [plural-noun] to pay for the vacation. text file 2: weather plays an important part in our [noun] everyday. what is weather you ask? according to [adjective] scientists, who are known as meteorologists, weather is what the [noun] is like at any time of the [noun]. it doesn't matter if the air is [adjective] or [adjective], it's all weather. when vapors in [adjective] clouds condense, we have [noun] and snow. a lot of [noun] means a [adjective] snowstorm! text file 3: [name] is having a party! it's going to be at [place] on [day-of-the-week]. make sure to show up at [time], or else you will be required to [verb] a/an [animal] with your [body-part].

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
You know the right answer?
Python 3 madlibs read file--slice string--take inputtext input included at very bottomno third party...
Questions
question
Physics, 27.01.2020 06:31
question
Social Studies, 27.01.2020 06:31
Questions on the website: 13722359