Question: give the code only not an explanation. put names everything included. Mad Libs For those who are not familiar with Mad Libs - It is

give the code only not an explanation. put names everything included.

Mad Libs

For those who are not familiar with Mad Libs - It is a popular and silly game that people use primarily to help people learn about parts of speech - such as nouns, verbs, adjectives, etc. There is a simple story written usually one to two paragraphs long and certain parts of the sentences are left blank to be filled in by asking "Enter a Noun" or "Enter an Adjective" and then the words input will be used to write the story on the screen. See the bottom of these instructions for an image of an example Mad Libs story.

Use this starter Code to begin your Project: (Make sure to open the file in editor like pycharm

main.pyDownload main.py


Learning objectives:

  • Practice with control structures (if/elif/else)
  • Compare strings
  • Compare numbers
  • Use a while loop

Programming Scenario:

You will be writing a program for a simple Mad Libs game.

Here are some examples to help inspire you:

  • Favorite superhero story
  • A favorite childhood fairy tale
  • Favorite tv show/movie themed
  • Something silly that doesn't need to make any sense
  • A scary Halloween story

Requirements:

Your program should, at minimum, do the following:

  • Output a title for the game.
  • Ask if the user would like to play a game.
  • Ask for the players name. Greet the player.
  • Ask the player to choose from TWO story ideas you have created. Use an if statement here to separate the code for each choice.
  • Ask the player to input between 6 to 10 names/words/numbers to fill in spots for your story. Please do not go over 10 inputs because it can get very long to run/test the programs!
  • Create aa short story to go along with the gameplay, substituting their inputted words into the story. Each story should be different and ask for different inputs. Do not reuse the same inputs for each story please. Your stories should be at a minimum of 4 sentences.
  • Ask if the user would like to play again (use a loop for this). Validate the user input as being y/n. If they input something that is NOT one of your options, ask the player to try again.
  • Validate the user input for the story selection. If they input something that is NOT one of your options, ask the player to try again.
  • Create a counter to record how many stories they have created. Display the counter before asking if they would like to play again.
  • Spend time formatting your output so that it looks nice.

Example Output: (sorry this is so not a funny story!) Welcome to my Mountain Adventure Mad Libs game. Would you like to play (y/n)? y First, what is your name? Dena Hello, Dena! Which story line would you like to play with? a. Going for a Hike b. Building a Campfire What is your choice (a/b)? b Now, let me get some information from you to make this a fun story. 1) What is a food you like? skittles 2) Give me a number from 5 to 10? 8 3) What is the name of a family member or close friend? Logan 4) Give me an adjective: pretty 5) Give me a verb ending in -ing: swimming 6) Give me a type of animal: kitten Dena, here is your story: You and Logan decide to build a pretty campfire. You wander around the forest looking for some dry wood to use to make a campfire to cook your skittles. Eventually, you collect 8 twigs. You hear a noise. You hide behind a tree. All of a sudden you see a large hairy kitten walk by. Logan runs up to you and asks what is taking so long. You tell them that you would rather be swimming. You have created 1 story. Would you like to play again (y/n)? n



Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!