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, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
You know the right answer?
Python 3 madlibs read file--slice string--take inputtext input included at very bottomno third party...
Questions
question
History, 03.07.2019 18:30
question
Mathematics, 03.07.2019 18:30
question
Spanish, 03.07.2019 18:30
question
Mathematics, 03.07.2019 18:30
question
Mathematics, 03.07.2019 18:30
question
Mathematics, 03.07.2019 18:30
question
Mathematics, 03.07.2019 18:30
Questions on the website: 13722361