Advertisement
sweetvalentina

Playing around with Py code and MadLibs | a game!

Sep 19th, 2013
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.38 KB | None | 0 0
  1. # Playing around with Py and MadLibs | fill in the gaps to create a story
  2.  
  3. noun1 = raw_input("Enter a noun: ")
  4. verb1 = raw_input("Enter a verb, past tense: ")
  5. noun2 = raw_input("Enter another noun: ")
  6. verb2 = raw_input("Enter another verb, past tense: ")
  7. adjective1 = raw_input("Enter an adjective: ")
  8. narrator = raw_input("Enter I: ")
  9. action = raw_input("Who told who/what? Enter a suitable action: ")
  10. adjective2 = raw_input("Enter another adjective: ")
  11. town = raw_input("Enter 'town': ")
  12. verb3 = raw_input("Enter another verb, past tense: ")
  13. verb4 = raw_input("Enter another verb, present tense: ")
  14.  
  15.  
  16. print "It was a fine day when Mr. " + noun1 + " and Mr. " + noun2 + ", " + verb1 + "."
  17. print "When they " +  verb1 + ", " "they " +  verb2 + "."
  18. print "That's what happened on that day when Mr. " + noun1 + " and Mr. " + noun2 + ", " + verb1 + "."
  19. print "It was " + adjective1 + " to watch. " + " So " + narrator + " told " + action + "."
  20. print "It was " + adjective2 + "!"
  21. print "Everyone in " + town + " talked about it for days!"
  22. print narrator + " was so " + verb3 + ", " + narrator + " couldn't " + verb4 + "."
  23. print "This is the little story " + narrator + " told you. Do you believe me? Why sould you?"
  24. print "The end. Or not."
  25.  
  26. # this is an exercise for p2pu madlib challenge task 5
  27. # by filling in the required fields you create a story. It's pretty cool.
  28. # why not try it out?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement