asked 35.0k views
0 votes
How do I convert years to days on Python. For example, if I were to enter 3 years it should output "You are 1095 days old".

1 Answer

2 votes

years = int(input("Enter the # of years: "))

print("You are "+str(years*365)+" days old")

I wrote the code in python 3.8. I hope this helps!

answered
User Ibn Rushd
by
7.6k points

Related questions