diff --git a/main.py b/main.py index 5d2105d..fa2280c 100644 --- a/main.py +++ b/main.py @@ -11,14 +11,27 @@ name = input("Enter your name: ") name = name.title() -# How many times to display the notification? -howMany = int(input("How many times would I remind you to drink water? ")) - # After how many minutes to display the notification? notificationTime = int(input(f"In how many min(s) would you like me to remind you to drink water? ")) -# Final Program to Loop -for i in range(howMany): +# # How many times to display the notification? (Uncomment for using for loop and comment for using while loop) +# howMany = int(input("How many times would I remind you to drink water? ")) + + +# # Final Program to Loop + +# for i in range(howMany): +# # Loading the current timeCurrent time +# currentTime = datetime.datetime.now() +# timeNow = currentTime.strftime("%H:%M:%S") +# +# # Displaying the notification +# toaster.show_toast(f"Drink Water", f"Drink Water {name} its {timeNow}!", duration=10) +# # Waiting for the given time and again displaying notification +# time.sleep(notificationTime * 60) +# --------------------------OR--------------------------------- + +while True: # Loading the current timeCurrent time currentTime = datetime.datetime.now() timeNow = currentTime.strftime("%H:%M:%S") @@ -27,3 +40,5 @@ toaster.show_toast(f"Drink Water", f"Drink Water {name} its {timeNow}!", duration=10) # Waiting for the given time and again displaying notification time.sleep(notificationTime * 60) + +# Either use for loop or use while loop for the program