teromakotero

Happy Birthday

May 5th, 2019
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. '''
  2. Create a function with one parameter, name, which will be the name of a person.
  3. The function should then “sing” Happy Birthday to that person, inserting their
  4. name at the correct point. Give your function a sensible name.
  5. '''
  6. name = input("Give me your name: ")
  7.  
  8. def happy(name):
  9.     string = "Happy Birthday to You\nHappy Birthday to You\nHappy Birthday Dear {}\nHappy Birthday to You.\n\nPaljon onnea vaan!\nPaljon onnea vaan!\nPaljon onnea {}!\nPaljon onnea vaan!".format(name,name)
  10.     return string
  11. print("")
  12. print(happy(name))
Advertisement
Add Comment
Please, Sign In to add comment