Answers for "findout age in python"

8

python calculate age from date of birth

from datetime import date

def calculate_age(born):
    today = date.today()
    return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
Posted by: Guest on April-17-2021
1

how to find current age from date of birth in python

today_date = datetime.datetime.now()
dob = datetime.datetime(1982, 5, 20)
print(today_date - dob)
Posted by: Guest on July-08-2021
0

findout age in python

#AGE CALCULATOION IN PYTHON:

def calculator(age):
    age = (2022 - int(age))
    print("You are "+str(age)+" years Old")
calculator(input("Type your Birth Year: "))

#The easy way to calculate anyones age.Very simple trick.
# Just call a function
Posted by: Guest on February-26-2022

Code answers related to "findout age in python"

Python Answers by Framework

Browse Popular Code Answers by Language