Input no. of days from user and display it as ___ years ___ months ___ days format.
python programme
Answers
Answered by
0
DAYS_IN_WEEK = 7
# Function to find
# year, week, days
def find( number_of_days ):
year = int(number_of_days / 365)
week = int((number_of_days % 365) /
DAYS_IN_WEEK)
days = (number_of_days % 365) % DAYS_IN_WEEK
print("years = ",year,
"\nweeks = ",week,
"\ndays = ",days)
Similar questions