Answer to Question #236419 in Python for Sai Kumar Gudisa

Question #236419

Given

N number of days as input, write a program to convert N number of days to years (Y), weeks (W) and days (D).


solution


1
Expert's answer
2021-09-12T18:52:14-0400
N = int(input("Enter an interger for the number of days : "))
Y = N//365
W = (N%365)//7
D = N - ((Y * 365) + (W*7))
print(N, "days =", Y, "years,", W, "weeks and", D,"days")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS