# Lab_5_Exercise_1_Problem_1 (3.5 in online textbook) # Function call must be after function definition # Otherwise, we get the error: # Traceback (most recent call last): # File "U:\pub_html\120\Labs\Lab_5\Lab_5_Exercise_1_Problem_1.py", line 9, in # repeat_lyrics() # NameError: name 'repeat_lyrics' is not defined # repeat_lyrics() # The function definitions can be in any order: # def print_lyrics(): before or after def repeat_lyrics(): def print_lyrics(): print("I'm a lumberjack, and I'm okay.") print("I sleep all night and I work all day.") return def repeat_lyrics(): print_lyrics() print_lyrics() return # Main part of the program repeat_lyrics()