From 5ca53a9f6617355591ac890e5788f1f515f370eb Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 31 Oct 2021 20:44:15 -0400 Subject: [PATCH] [+] Microwave time --- practice/microwave.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 practice/microwave.py diff --git a/practice/microwave.py b/practice/microwave.py new file mode 100644 index 0000000..b7c0455 --- /dev/null +++ b/practice/microwave.py @@ -0,0 +1,7 @@ +# Output two different ways you can enter a time duration on the microwave +if __name__ == '__main__': + while True: + s = int(input()) + print(f'{s // 60}:{s % 60:02}') + if s >= 60: + print(f'{s // 60 - 1}:{s - (s // 60 - 1) * 60:02}')