Created
September 6, 2016 18:45
-
-
Save 0x49D1/8117d8e390a6d8ba4b33cd4dc220ba31 to your computer and use it in GitHub Desktop.
Asks user for his birthyear and shows what year he hits 100
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
import datetime | |
# 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. | |
one_hundred_years = datetime.date.today().year - int(input("Enter your age:\n")) + 100 | |
print_count = input("How many times do you want to print it?\n") | |
for i in range(int(print_count)): | |
print("%s You will hit 100 years on %s"%(i+1,one_hundred_years)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment