Advertisement
mvaganov

more ways to create the Madlibs

Oct 27th, 2016
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. owner = input("person")
  2. object = input("noun")
  3. adjective = input("adjective")
  4.  
  5. print("This is "+owner+"'s "+object+
  6.   ". It is "+adjective+".")
  7.  
  8. # you can store the entire story in a variable!
  9. story = "This is "+owner+"'s "+object+". It is "+ adjective+"."
  10. print(story)
  11.  
  12. # you can add a little bit to the story at a time
  13. storySoFar = "This is "
  14. #   variable += value    means    variable = variable + value
  15. storySoFar += owner
  16. storySoFar += "'s "
  17. storySoFar += object
  18. storySoFar += ". It is "
  19. storySoFar += adjective + "."
  20. print(storySoFar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement