Created
June 5, 2016 17:31
-
-
Save ghughes13/c8aa5764ea5074fe9ed433e03126793d to your computer and use it in GitHub Desktop.
Calculates Years Until You Turn 100
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
name = str(input("What's your name? ")) | |
age = int(input("What's your age? ")) | |
years = 100 - age | |
printNum = int(input("How many times do you want to print it? ")) | |
def timesPrint(printNum): | |
while printNum > 0: | |
print ("I see that you're " + str(age) + ". That means you'll be 100 in " + str(years) + " years!") | |
printNum -= 1 | |
timesPrint(printNum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment