Python Practice Lab
mediumUnit 1 · Basics, Input/Output & Operators

P3. Duration Formatter

Basics, Input/Output & Operators

Read a duration in seconds and print it as days and a clock time in HH:MM:SS format. Use // and % to split the seconds, and format each of hours, minutes and seconds with two digits (for example 05).

Input Format

  • Line 1: seconds; an integer

Output Format

  • Line 1: <d> days <HH>:<MM>:<SS>
  • Line 2: Total minutes: <seconds // 60>

Constraints

  • 0 ≤ seconds ≤ 10000000

Sample Test Cases

Sample 1
Input
93784
Output
1 days 02:03:04
Total minutes: 1563
Sample 2
Input
59
Output
0 days 00:00:59
Total minutes: 0

Submitting checks 2 sample cases and 5 hidden test cases.

Hints

Saved
Custom 1

This is your own input, so Run will show what your program prints but can't say whether it's correct.