Age Calculator

Age Calculator on Python


Hi Friends
Again one more program code i show you today...
This code calculate your age as per given input as YOB
Here, Method using import date function..


CODE:

from datetime import date
today = date.today()
y = today.strftime("%Y")

a = int(input('Enter your birth year: '))
age = int(y) - a
print("Your age is",age)

-----

By
PyKAR

Comments

Popular posts from this blog

Hardy - Ramanujan Number (Magic Number) Program in Python

FLAMES CODE ON PYTHON

Count Swap for Sorting in Python