Question

In: Computer Science

step by step in python please Madlibs: A children's game where someone is prompted for a...

step by step in python please

Madlibs: A children's game where someone is prompted for a series of words of particular types (e.g., nouns, verbs, colors, animals, etc.) and then those words are inserted into a "story" often creating funny outcomes. Write a Madlib program that will prompt a user for the following types of words in this order:

Noun, Food, Food, Verb, Adverb, Adjective, Plural Noun, Color, Verb, Verb, Noun, Female Name, Plural Noun

Using those inputs, output the following "song" based on the beginning of The Beatle's "Lucy in the Sky with Diamonds", substituting the user inputs into the appropriate places to create the Madlib:

Picture yourself in a [NOUN1] on a river,
With [FOOD1] trees and [FOOD2] skies
Somebody calls you, you [VERB1] quite [ADVERB],
A girl with [ADJECTIVE] eyes.

Cellophane [PLURAL_NOUN1] of [COLOR] and green,
[VERB2] over your head.
[VERB3] for the girl with the [NOUN2] in her eyes,
And she's gone.

[FEMALE_NAME] in the sky with [PLURAL_NOUN2]...
[FEMALE_NAME] in the sky with [PLURAL_NOUN2]...
[FEMALE_NAME] in the sky with [PLURAL_NOUN2]...

For this assignment, clean formatting of the output will count toward your score, i.e., it should look correct with proper spacing

Solutions

Expert Solution

SOLUTION:

noun1 = input("Tell a noun : ")
food1 = input("What is your favorite food : ")
food2 = input("What is your second favorite food : ")
verb1 = input("Now, tell me a verb : ")
adverb = input("Any Adverb? : ")
adjective = input("How about an adjective? : ")
plural_noun1 = input("Tell a plural noun : ")
color = input("What is your favorite color : ")
verb2 = input("One verb please! : ")
verd3 = input("One more verb please! : ")
noun2 = input("Tell a noun again : ")
female_name = input("Tell me a girl name : ")
plural_noun2 = input("Tell an another plural noun : ")

print("\nA song for you...\n")
print("Picture yourself in a", noun1, "on a river,")
print("With", food1, "trees and", food2, "skies")
print("Somebody calls you, you", verb1, "quite", adverb,",")
print("A girl with", adjective, "eyes.")
print("Cellophane", plural_noun1, "of", color, "and green,")
print(verb1, "over your head.")
print(verd3, "for the girl with the", noun2, "in her eyes,")
print("And she's gone.")
print(female_name, "in the sky with", plural_noun2,"...")
print(female_name, "in the sky with", plural_noun2,"...")
print(female_name, "in the sky with", plural_noun2,"...")

OUTPUT:


Related Solutions

Step by step in python please Write a program this will read a file (prompt for...
Step by step in python please Write a program this will read a file (prompt for name) containing a series of numbers (one number per line), where each number represents the radii of different circles. Have your program output a file (prompt for name) containing a table listing: the number of the circle (the order in the file) the radius of the circle the circumference the area of the circle the diameter of the circle Use different functions to calculate...
Game where someone goes first - What is backward induction One-period game , Multi-period game -...
Game where someone goes first - What is backward induction One-period game , Multi-period game - differences What is the principal agent problem? Negative / positive externalities. Public goods, private goods, club goods, common goods Tragedy of the commons Under-funded, Free rider
Hello can someone please explain the is lm curves step by step for me?
Hello can someone please explain the is lm curves step by step for me?
Hello can someone please explain the AS AD curve step by step to me? Thank you
Hello can someone please explain the AS AD curve step by step to me? Thank you
Can someone please explain step by step the following solution. i am going to post the...
Can someone please explain step by step the following solution. i am going to post the solution i just need someone to please explain why each step is taking and what formula is being used. please explain it to me thank tyou Suppose A is a set and {Bi | i ∈ I} is an indexed family of sets with I ≠∅. Prove that A \ ( ∪i∈I Bi ) = ∩i∈I (A \ Bi). A be a set Bi...
Can someone please advise how to solve this problem step-by-step on a calculator? Thanks! Option to...
Can someone please advise how to solve this problem step-by-step on a calculator? Thanks! Option to wait. Your company is deciding whether to invest in a new machine. The new machine will increase cash flow by $435,000 per year. You believe the new technology used in the machine has a 10 year life. Obsolete 10 years from today. Machine is currently priced at 2.8 Million. Cost of machine will decline $215,000 per year until it reaches $2.155 million, where it...
Can someone tell me what is wrong with this code? Python pong game using graphics.py When...
Can someone tell me what is wrong with this code? Python pong game using graphics.py When the ball moves the paddles don't move and when the paddles move the ball doesn't move. from graphics import * import time, random def racket1_up(racket1):    racket1.move(0,20)        def racket1_down(racket1):    racket1.move(0,-20)   def racket2_up(racket2):    racket2.move(0,20)   def racket2_down(racket2):    racket2.move(0,-20)   def bounceInBox(shape, dx, dy, xLow, xHigh, yLow, yHigh):     delay = .005     for i in range(600):         shape.move(dx, dy)         center = shape.getCenter()         x = center.getX()         y = center.getY()         if x...
Can someone please explain step-by-step if possible? Miller Company’s contribution format income statement for the most...
Can someone please explain step-by-step if possible? Miller Company’s contribution format income statement for the most recent month is shown below: Total Per Unit Sales (37,000 units) $ 222,000 $ 6.00 Variable expenses 111,000 3.00 Contribution margin 111,000 $ 3.00 Fixed expenses 44,000 Net operating income $ 67,000 Required: (Consider each case independently): 1. What is the revised net operating income if unit sales increase by 20%? 2. What is the revised net operating income if the selling price decreases...
PYTHON GAME OF PIG The game of Pig is a simple two player dice game in...
PYTHON GAME OF PIG The game of Pig is a simple two player dice game in which the first player to reach 100 or more points wins. Players take turns. On each turn a player rolls a six-sided die. After each roll: a) If the player rolls a 1 then the player gets no new points and it becomes the other player’s turn. b) If the player rolls 2-6 then they can either roll again or hold. If the player...
PLEASE USE PYTHON THANK YOU In the game of Lucky Sevens, the player rolls a pair...
PLEASE USE PYTHON THANK YOU In the game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7, the player wins $4; otherwise, the player loses $1. Suppose that, to entice the gullible, a casino tells players that there are many ways to win: (1, 6), (2, 5), and soon. A little mathematical analysis reveals that there are not enough ways to win to make the game worthwhile; however, because many people's eyes...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT