Created
September 6, 2019 16:29
-
-
Save AtufaShireen/3f877547be8a0762db3c17ba45138d58 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
from datetime import date | |
curr_date=date.today() | |
while True: | |
try: | |
age=int(input('How Old Are You?')) | |
except ValueError: | |
print('please enter your age') | |
else: | |
break | |
req_age=100-age | |
year_for_hundered_years=int(curr_date.strftime('%Y'))+req_age | |
print('You\'ll be 100 years old in ',year_for_hundered_years) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment