Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python code please Task 4: Mad Libs-Short Version In the word game Mad Libs, people are asked to provide parts of speech such as

image text in transcribed

image text in transcribed

in python code please

Task 4: Mad Libs-Short Version In the word game Mad Libs, people are asked to provide parts of speech such as nouns, verbs, adverbs, or adjectives. These words are used to fill in the blanks of a template or to replace the same parts of speech in a sentence. In this task you're going to write a program to demonstrate how the game works for a single sentence. Consider this sentence from Ready Player One by Ernest Cline: A lich was an undead creature, usually an incredibly powerful wizard or king who had employed dark magic to bind his intellect to his own reanimated corpse, thus achieving a perverted form of immortality. Write a program that will do the following Prompt the user for one verb, four nouns, and three adjectives. Print the sentence above but with words replaced as follows: A [noun] was an undead [noun], usually an incredibly powerful [noun] or king who had employed [adjective] magic to [verb] his [noun] to his own [adjective] corpse, thus achieving a [adjective] form of immortality. Your program should have three functions and use function calls as appropriate. It should end with a call to main (). Note that the main() function doesn't require a return statement because the main) call doesn't have a body or a parameter. Include the f ollowing functions: .get-sent-part : Prompts user for part of speech; called multiple times from main) build.sentence ): Uses string concatenation, i.e., combining string using the plus sign, as appropriate to build the sentence from the user's words and the sentence words main): Calls all the functions as appropriate and prints the Mad Lib sentence. Don't forget to assign names to function calls that require returned values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Draw a picture consisting parts of monocot leaf

Answered: 1 week ago

Question

What is the preferred personality?

Answered: 1 week ago

Question

What is the relationship between humans?

Answered: 1 week ago