Advertisement
ERik24Z

Madlibs

Aug 15th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.46 KB | None | 0 0
  1. """
  2. This program generates passages that are generated in mad-lib format
  3. Author: Erik
  4. """
  5. from datetime import datetime
  6. now = datetime.now()
  7.  
  8. # The template for the story
  9.  
  10. STORY = "This morning %s woke up feeling %s. 'It is going to be a %s day!' Outside, a bunch of %ss were protesting to keep %s in stores. They began to _ to the rhythm of the %s, which made all the %ss very %s. Concerned, %s texted %s, who flew %s to %s and dropped %s in a puddle of frozen %s. %s woke up in the year %s, in a world where %ss ruled the world."
  11. print "Hello, welcome to Mad Libs, we're starting!"
  12. name = raw_input("Please, state your name:")
  13. adjective_1 = raw_input("Please, give us the first adjective: ")
  14. adjective_2 = raw_input("Please, give us the second adjective: ")
  15. adjective_3 = raw_input("Please, give us the third adjective: ")
  16. verb_1 = raw_input("Please, give us the first verb: ")
  17. noun_1 = raw_input("Please, give us the first noun: ")
  18. noun_2 = raw_input("Please, give us the second noun: ")
  19. animal_1 = raw_input("State an animal: ")
  20. food_1 = raw_input("State a food: ")
  21. fruit_1 = raw_input("State a fruit: ")
  22. superhero_1 = raw_input("State a superhero: ")
  23. country_1 = raw_input("State a country: ")
  24. dessert_1 = raw_input("State a desert: ")
  25. year_1 = raw_input("State a year: ")
  26.  
  27. print STORY % (name, adjective_1, adjective_2, animal_1, food_1, verb_1, noun_1, fruit_1, adjective_3, name, superhero_1, name, country_1, name, dessert_1, name, str(year_1), noun_2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement