"""
happy_birthday.py
A classic example of functions:
the "happy birthday song"
Jim Mahoney | Sep 2012
"""
first_line = "hi there"
def happy_birthday(name):
""" Input: a person's name.
Output: the happy birthday song as a string. """
first_line = "Happy Birthday to you"
song = first_line + ",\n" + \
first_line + ",\n" + \
"Happy Birthday dear " + name + ",\n" + \
first_line + "!\n"
return song
def main():
print
print happy_birthday("Peter")
print
print happy_birthday("Mary")
print
main()
syntax highlighted by Code2HTML, v. 0.93pm6