Write a Python program Convert all units of time into seconds
I have used python 3.7 compiler for debugging purpose.
days = int(input("Input days: ")) * 3600 * 24 hours = int(input("Input hours: ")) * 3600 minutes = int(input("Input minutes: ")) * 60 seconds = int(input("Input seconds: ")) Totaltime = days + hours + minutes + seconds print("The amounts of seconds", Totaltime)
Result:
Input days: 5
Input hours: 10
Input minutes: 2
Input seconds: 1
The amounts of seconds 468121
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
I have used python 3.7 compiler for debugging purpose.
Result:
Input days: 5
Input hours: 10
Input minutes: 2
Input seconds: 1
The amounts of seconds 468121
need an explanation for this answer? contact us directly to get an explanation for this answer