You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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.
# This App tells the year you are gonna be 100 years old
# This part is the part that tells the date of today
from datetime import datetime
now = datetime.now()
current_year = now.year
current_month = now.month
current_day = now.day
# This part is the personal input part
name = input(" what is your name?\t")
while not (name.isalpha()):
print("please try again")
name =input("What is your name?\t")
print(" your name is " + name)
age = input(" what\'s your age?\t")
while not (age.isdigit()):
print(" please try again")
age = input(" what\'s your age?\t")
print('your age is ' +age)
# The part of naming and age ends here then we move to persons aging part
year = str((current_year - int(age)) + 100)
birthyear = str( current_year - int(age))
print( name + " your birth year is " + birthyear)
print( "and you will be 100 years old in the year " + year)