Inspiration

Most healthy people can stay well hydrated by drinking water and other fluids whenever they feel thirsty. For some people, fewer than 8 glasses may be enough. Other people may need more than 8 glasses each day. While plain water is best for staying hydrated, other drinks and foods can help, too.

How we built it

1.Import module 2.Get time interval from the user, it asks user to input hour, minutes and seconds 3.Convert them to seconds and return time to main function. 4.Add loop to start timer and generate a toast message when timer reaches the set time 5.After sending notification program will call to function to write log file. This function will get current time and date
6.Create a .txt file and append drink water log to it. Here is a program made by me using python in order to make a Drink Water notification system and here it goes..... import time from win10toast import ToastNotifier import datetime

def getTimeInput(): hour = int(input("hours of interval :")) minutes = int(input("Mins of interval :")) seconds = int(input("Secs of interval :")) time_interval = seconds+(minutes*60)+(hour*3600) return time_interval

def log(): now = datetime.datetime.now() start_time = now.strftime("%H:%M:%S") with open("log.txt", 'a') as f: f.write(f"You drank water {now} \n") return 0

def notify(): notification = ToastNotifier() notification.show_toast("Time to drink water") log() return 0

def starttime(time_interval): while True: time.sleep(time_interval) notify()

if name == 'main': time_interval = getTimeInput() starttime(time_interval

Accomplishments that we're proud of

Learn to always stay hydrated and regularly drink water......

Built With

Share this project:

Updates

Submission history