Q. Write a module to input total number of days and find the total number of months and remaining days after months, and display it in another program.


Answer =


Module name depend on user’s mind.


def count(x) :
    print ("No. of month :- ", (x // 30))
    print ("Remaining days :- ", (x % 30))


Output :-

>>> count(35)
No. of month :-  1
Remaining days :-  5

>>> count(69)
No. of month :-  2
Remaining days :-  9

>>>

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post