Mrinank-Bhowmick / python-beginner-projects

Explore a collection of beginner-friendly Python projects that can be completed with minimal code. Perfect for learning the basics and improving your coding skills.
https://github.com/Mrinank-Bhowmick/python-beginner-projects/wiki
MIT License
1.1k stars 621 forks source link

Enhancement of timer #444

Closed ayan-joshi closed 11 months ago

ayan-joshi commented 11 months ago

Is your feature request related to a problem? Please describe. The timer python script is very basic I would like to enhance it and add some feature to it

Describe the solution you'd like The enhancement will be :

Encapsulated the timer logic in a function countdown_timer. Added input validation to ensure the duration is a positive integer. Improved user-friendly messages and error handling. The timer can be stopped by the user with a KeyboardInterrupt (Ctrl+C). Used a try...except block to catch and handle exceptions.

Additional context Please assign me this issue under hacktobefest label @Mrinank-Bhowmick

Mrinank-Bhowmick commented 11 months ago

Is your feature request related to a problem? Please describe. The timer python script is very basic I would like to enhance it and add some feature to it

Describe the solution you'd like The enhancement will be :

Encapsulated the timer logic in a function countdown_timer. Added input validation to ensure the duration is a positive integer. Improved user-friendly messages and error handling. The timer can be stopped by the user with a KeyboardInterrupt (Ctrl+C). Used a try...except block to catch and handle exceptions.

Additional context Please assign me this issue under hacktobefest label @Mrinank-Bhowmick

No more contributions under hacktoberfest label now, reopen this issue after October if you are really interested in open source contribution