Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Enter a name: Salvador Enter a noun: spoon Your task is to implement a Mad Libs style story generator in Python. You will prompt the

image text in transcribed

Enter a name: Salvador Enter a noun: spoon Your task is to implement a Mad Libs style story generator in Python. You will prompt the user for five words, then print out a story using the words. One of the "words must be a number and used (and formatted!) as a dollar amount. Enter a verb: compute Enter an adjective: sparkly Enter a number: 1000000 User inputs Your program should prompt the user for the following inputs: Salvador woke up one morning and decided to have a spoon for breakfast. Salvador felt particularly sparkly that morning and decided that it was time to compute. Now that must be worth $1,000,000.00! . a name As evidenced by this example, your story does not have to be very good. . a noun a verb Formatting As the main topic of this assignment, your program will be evaluated on certain formatting criteria: an adjective a number Your input prompts should have one space between prompt and user input Enter a name: Salvador # Correct Each word should be entered one at a time. Store each of these inputs in a variable, making sure that the the appropriate data type is used. Enter a name : Salvador # Incorrect . Variables used in your output should be spaced like a normal word, i.e. one space between words, no space before punctuation Output Next, write a story using the variables. Your story should meet the following requirements: decided that it was time to compute. # Correct decided that it was time tocompute. # Incorrect decided that it was time to compute. # Incorrect It must not be offensive It must be original It must use all the user input variables (not necessarily in order, variables can be repeated) The number should be displayed as money. It should be formatted with a dollar sign, commas between thousands, and two decimal places Sample program An complete example of what your program should look like is shown below, with user input highlighted in green. Your program does not need to print in green, this is just to illustrate which words are variables: Now that must be worth $1,000,000.00! # Correct Now that must be worth $0.43! # Also correct Now that must be worth $1000000.00! # Incorrect (no) Now that must be worth $1000000! # Incorrect (no decimal) Now that must be worth 1,000,000.00! # Incorrect (no $)

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions