Created
February 6, 2016 15:55
-
-
Save frankV/7aee5f4bf91d6d02a75d to your computer and use it in GitHub Desktop.
python method tutorial for HackFSU
This file contains hidden or 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 greeting(): | |
print 'hello' | |
userInput = raw_input('> ') | |
print userInput | |
if userInput == 'foo': | |
foo() | |
elif userInput == 'bar': | |
bar() | |
def foo(): | |
print 'called foo' | |
greeting() | |
def bar(): | |
print 'called bar' | |
greeting() | |
if __name__ == '__main__': | |
greeting() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment