write a program to convert n to years weeks and days
given number of days as input.write a program to convert n to years weeks and days.
import sys
try:
days = int(sys.argv[1])
except:
days = int(input())
y = days / 365
w = (days % 365) / 7
d = (days % 365) % 7
print("%d years %d weeks %d days" % (y, w, d))
Comments
Post a Comment