From f08dd12e1b48a9117541efca74753efbd0ae6897 Mon Sep 17 00:00:00 2001 From: starstruckgall <146040178+starstruckgall@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:54:31 +0300 Subject: [PATCH] Update timer.py 1.The indentation of the print("Timer Finished!") statement is incorrect. It should be outside the while loop. 2.There's an issue with the variable naming. You're using the variable name time both for the imported module time and for user input. It's better to use a different variable name for the user input. --- CountDown Timer_Python/timer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CountDown Timer_Python/timer.py b/CountDown Timer_Python/timer.py index 10c0299..57ca55c 100644 --- a/CountDown Timer_Python/timer.py +++ b/CountDown Timer_Python/timer.py @@ -11,9 +11,9 @@ def CountDown(t): time.sleep(1) t -= 1 - print("Timer Finished!") + print("Timer Finished!") - time = input("Enter the Duration In Seconds: ") + duration = int(input("Enter the Duration In Seconds: ")) - CountDown(int(t)) \ No newline at end of file + CountDown(int(t))