Created
June 4, 2020 13:45
-
-
Save Tig10/2d5d5a0788ebdf57bd29aecdc5d75919 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
''' | |
Create a program that asks the user to enter their name and their age. | |
Print out the message addressed to them that tells them the year they | |
will turn 100 years old. | |
''' | |
from datetime import datetime | |
today = datetime.now() | |
name = input('What is your name? ') | |
age = int(input('What is your age? ')) | |
years_to_100 = 100 - age | |
year_of_100 = today.year + years_to_100 | |
print(f'{name} you will be a 100 years old in the year {year_of_100}.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment