daily pastebin goal
92%
SHARE
TWEET

more ways to create the Madlibs

mvaganov Oct 27th, 2016 (edited) 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
Top