Write a Python program Convert all units of time into seconds

days = int(input("Input days: ")) * 3600 * 24
hours = int(input("Input hours: ")) * 3600
minutes = int(input("Input minutes: ")) * 60
seconds = int(input("Input seconds: "))

time = days + hours + minutes + seconds

print("The  amounts of seconds", time)

output:-
Input days: 12
Input hours: 2
Input minutes: 13
Input seconds: 77
The  amounts of seconds 1044857

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post