Посмотрите код в Phyton, не могу вывести возраст, ответ должен быть 76 лет print("Enter your name:")
name = "JOHN"
print(name.capitalize())
print("Enter your last name:")
lastname = "Doe"
print(lastname)
print("When were you born?:")
print("1945")
date_of_birth = datetime.strptime(input("2021"))
def calculate_age(born):
today = date.today(2021)
return today.year - born.year
age = calculate_age(date_of_birth)
print(age)
print("Where are you from?")
state = "canada"
print(state.capitalize())
message = "Hello, %s %s . You are %s years old. You are living in %s" % (name, lastname, age, state)
print(message)