Python Challenge- Mad Libs Nursery Rhyme

docx

School

Embry-Riddle Aeronautical University *

*We aren’t endorsed by this school

Course

NA

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

1

Uploaded by ConstableDinosaur3920

Report
Python Challenge- Mad Libs Nursery Rhyme Learning Path: Python Level 1 - The Basics Basic background information on Python: Introduction to Python CHECK THIS SECTION FIRST! Here is the COURSE with the background information you will need to complete the challenges: Python: Variables & Input Challenge: Mad Libs Nursery Rhyme HINTS: To ask the user to input a word use code like this: noun1 = input("Enter a noun.") Python will display your message ("Enter a noun.") and whatever the user inputs will be assigned to the variable (noun1). Enter this line as many times as you need, changing the variable for each (i.e. verb1, noun2, verb2, adjective) To display the line with the user's word included, use this code: print "Mary had a little %s," % (noun1) Python will replace the "%s with whatever was input If you need more than one variable per line, you can follow this example: print "whose %s was %s as %s." % (noun2, adjective1, noun3) Python will replace all of the "%s" with the inputs in the order you have them. Here’s an example of a completed program ( do not use this as your solution, you mst choose a different nursery rhyme)
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help