N number of days as input, write a program to convert N number of days to years (Y), weeks (W) and days (D).Note: Take 1 year = 365 days. Input
The input contains single integer
N.Output
Print space-separated integers
Y, W and D.Explanation
Given
N = 1329. The value can be written as 1329 = 3 years + 33 weeks + 3 days So the output should be
3 33 3.
using basic python
1
Expert's answer
2021-08-16T05:48:41-0400
N = int(input("Enter No. of Days N: "))
Y = N//365
W = (N%365)//7
D = N - ((Y * 365) + (W*7))
print("%d = %d years + %d weeks + %d days."%(N,Y,W,D))
print("\n",Y,W,D)
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments