Created
March 20, 2017 02:57
-
-
Save ntcho/9bfba020ab45c4d43d9a7b6f5d2395eb to your computer and use it in GitHub Desktop.
Python's programmatic flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_lyrics(): | |
print "I'm a lumberjack, and I'm okay" | |
print "I sleep all night and I work all day" | |
# repeat_lyrics() | |
# return an error: "NameError: name 'repeat_lyrics' is not defined" | |
def repeat_lyrics(): | |
print_lyrics() | |
print_lyrics() | |
repeat_lyrics() | |
# might be copyrighted content | |
# from the book called "Think Python: How to Think Like a Computer Scientist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment