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 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
You know the right answer?
Python 3 madlibs read file--slice string--take inputtext input included at very bottomno third party...
Questions
Questions on the website: 13722362