Created
June 21, 2016 23:39
-
-
Save lbattaglioli2000/ebc26e369b170b41d1ea0f20b0ff5087 to your computer and use it in GitHub Desktop.
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
# Convert the string they entered to an integer | |
age = int(input("How old are you: ")) | |
# Determine how old the user will be after three years. | |
# You need to convert it to an integer because you cannot do math on a string. You'll get an error. Try it! | |
threeYears = age + 3 | |
# Tell the user how old they'll be in three years. | |
# The integer threeYears must be converted to a string in order to be printed. | |
print("In three years you'll be " + str(threeYears)) # This is concatenation, we'll learn this in the next lesson. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment