Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Create a function with one parameter, name, which will be the name of a person.
- #The function should then βsingβ Happy Birthday to that person, inserting their name at the correct point.
- #Give your function a sensible name.
- import time
- def person():
- yourname=input("What is your name? ")
- return yourname
- def happy_bday(name):
- for i in range(2):
- print("Happy birthday to you")
- time.sleep(1)
- print("Happy birthday dear", name)
- time.sleep(1)
- print("Happy birthday to you")
- name=person()
- happy_bday(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement