WAP THAT ASKS A USER FOR A NUMBER OF YEARS AND THEN PRINTS OUT THE NUMBER OF DAYS, HOURS ,MINUTES AND SECONDS IN THAT NO. OF YEARS.

31

y = float(input("How many years? "))

d = y * 365
h = d * 24
m = h * 60
s = m * 60

print(y, "years is:")
print(d, "days")
print(h, "hours")
print(m, "minutes")
print(s, "seconds")

Comments

Submit
0 Comments