Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_seconds(seconds):
- days = seconds // (24 * 3600)
- seconds %= (24 * 3600)
- hours = seconds // 3600
- seconds %= 3600
- minutes = seconds // 60
- seconds %= 60
- return days, hours, minutes, seconds
- total_seconds = 500 * 10 * 60 # 500 code * 10 min per code * 60 seconds --> int(input("Enter the total number of seconds: "))
- days, hours, minutes, seconds = convert_seconds(total_seconds)
- print("Days:", days)
- print("Hours:", hours)
- print("Minutes:", minutes)
- print("Seconds:", seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement