Created
July 27, 2017 15:59
-
-
Save jgarciabu/ba3191a88f42535ee05781c343fce786 to your computer and use it in GitHub Desktop.
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
""" | |
Practice Python 1st Exercise | |
Create a program that asks the user to enter their name and their age. | |
Print out a message addressed to them that tells them the year that they will turn 100 years old. | |
""" | |
import datetime | |
age = input("Please enter your age:") | |
printmultiple = int(input("How many times should I print the info:")) | |
now = datetime.datetime.now() | |
yearstillhundred = 100 - int(age) | |
for i in range(printmultiple): | |
print("You will be 100 in the year {}\n".format((int(now.year) + yearstillhundred))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment