Appointments Notifications Project

Appointments Notifications Project

Python Assignments

 

This Python assignment aims to familiarize students with scheduling and automation of notification messages.
Your task is to write a Python 3 script using the “plyer” library that will display a notification message on your screen every Wednesday at 7 pm to remind you of your Yoga class. Additionally, the script should display a notification message every day at 1 pm to remind you to pick up your father for his physiotherapy treatment.

This is a cool  Python project with a real application. It is an execellent opportunity for students to gain practical experience in using Python for dates and time operations, as well as integrating external libraries for notifications. They will also practice how to meet requirements of clients as well as important Python topics like  functions, “while” loops and the “time” library.

To complete this Python assignment, follow these steps:

  1. Install the plyer library by running the following command in your terminal: pip install plyer
  2. Import the necessary modules.
  3. Define a function to display the notification message
  4. Write the main logic of your script.

For more real Python projects, visit Practity’s store.

Solution

from plyer import notification
import datetime
import time

# Function to display the notification message
def display_notification(title, message):
    notification.notify(
        title=title,
        message=message,
        app_name='Reminder App',
        timeout=10
    )

# Main logic of the script
while True:
    current_time = datetime.datetime.now()
    
    # Yoga class reminder on Wednesdays at 7 pm
    if current_time.weekday() == 2 and current_time.hour == 19 and current_time.minute == 0:
        display_notification("Yoga Class Reminder", "Don't forget your Yoga class at 7 pm!")

 

We will be happy to hear your thoughts

Leave a reply

Python and Excel Projects for Practice
Register New Account
Shopping cart