← Back to challenges

A Simple Timer

PythonHardstringsnumberslogicmath

Instructions

Mubashir created a simple timer but he needs your help to make it readable inside a microcontroller.

Create a function that takes the number of seconds and returns the timer in "00:00:00" format.

Examples

simple_timer(0) ➞ "00:00:00"

simple_timer(59) ➞ "00:00:59"

simple_timer(60) ➞ "00:01:00"

simple_timer(3599) ➞ "00:59:59"

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Recursion: Sum of Multiplication