Drink Water Reminder Thumbnail 1

Drink Water Reminder Using Python | Python Projects For Beginners1 min read

Hey Python Programmers, Welcome Back to Another Python Project, Sometimes It Happens When you are Busy And Forget To Drink Water. And As we all Know We Should Drink 7-8 Glasses Of Water Everyday. So This Might Lead to Illness Or Dehydration of Body. Which is not Good for Your Health.

Best Laptops For Programming:

So We will be Creating a Drink Water Notification Using Python, Which Sends You a Notification to Drink Water In a Particular Time Intervals. This is Just a Notification Like you Get in Windows or Any Other Device.

We Will Be Creating this Project Using a pip Module In Python Called Plyer, So Without Wasting any more Time Let’s Get Started with Our Today Python Project, But Before that if have not seen My Jarvis Automation Projects You can Access Them Here Jarvis Automation.

Installing the Required Modules:

pip install plyer

Importing the Required Modules:

import time
from plyer import notification

Code:

if __name__=="__main__":
  while True:
        notification.notify(title= "Drink Water Now!",
        message = "You Should Drink 7 Glass Water In a Day To Prevent Your Body From Dehydration",timeout = 12)
    
        time.sleep(10)

So You Have Created your Program You can test it By Clicking on the Run Button. It Will Notify you to Drink Water as Per Your Interval.

Complete Code:

#Drink Water Notification Using Python
#importing Required Modules
import time
from plyer import notification
if __name__=="__main__":
  while True:
        notification.notify(title= "Drink Water Now!",
        message = "You Should Drink 7 Glass Water In a Day To Prevent Your Body From Dehydration",timeout = 12)
    
        time.sleep(10)

So this Was it for this Blog, See you in the Next One till Then Keep Coding Keep Exploring!

DOWNLOAD SOURCE CODE

Tanmay Sinha

Author

  • Tanmay Sinha

    Founder & CEO of MrProgrammer.in | I help Learning Freaks to Step into the World of Programming and Our Mission is to Provide High Quality and Valuable Content to Our Users! We believe that everyone has the potential to learn to code, and we are committed to making that happen. Our courses are designed to be engaging and interactive, and we offer a variety of learning paths to meet the needs of all learners. We are also committed to providing our learners with the support they need to succeed, and we offer a variety of resources to help learners learn at their own pace. If you are interested in learning to code, we encourage you to check out our courses. We are confident that you will find our content to be high-quality, valuable, and makes sense.