Q. Write a program that asks the user to input number of seconds and then expresses it in terms of many minutes and seconds it contains.


Answer :-


seconds = int(input("Enter number of seconds :- "))
minutes = seconds // 60
remainingseconds = seconds % 60

print('In Minutes:- ', minutes)
print('In Seconds:- ', remainingseconds)


Output :-

Enter number of seconds :- 500
In Minutes:-  8
In Seconds:-  20

>>>

Post a Comment

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

Previous Post Next Post