programming-examples/python/_Basics/Convert all units of time into seconds.py

8 lines
277 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
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)