Advertisement
zhongnaomi

a nursery rhyme

Jan 28th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. #create a function which when called displays a nursery rhyme
  2. import time
  3.  
  4. nurseryRhyme = ["It's raining; it's pouring. " ,"The old man was snoring." ,
  5. "He went to bed and bumped his head.","And couldn't get up in the morning."]
  6.  
  7. #Define a new function display_list
  8. # Print line by line
  9. def nursery_rhyme():
  10.     for poemS in nurseryRhyme:
  11.         print(poemS)
  12.         time.sleep(3)
  13.  
  14. nursery_rhyme()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement