Created
June 6, 2012 18:01
-
-
Save totallymike/2883630 to your computer and use it in GitHub Desktop.
input
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
# input(a string) prints the string as the prompt, then listens to stdin | |
# int() converts strings (what you get from stdin) to integers | |
age = int( input("Enter your age: ") ) | |
if age > 64: | |
print("You're old") | |
elif age > 17: | |
print("You can vote!") | |
else: | |
print("Nope!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment