You are on page 1of 31

ST. ANNE'S SR. SEC.

SCHOOL,
JODHPUR

COMPUTER SCIENCE PROJECT


2023-24

Topic: - To-do List Management System

Made By: - Submitted To: -


Uday Boyal Mrs Archana Agarwal
XII – A Ma’am

C.B.S.E Roll Number: -

Certificate
This is to certify that Uday Boyal of St. Anne's Sr. Sec. School of Class
XII-A has successfully completed his Computer Science Project entitled
To-do List Management System under the guidance of Mrs Archana
Agarwal. He has taken proper care and shown utmost sincerity in
completion of this project. I certify that the project is up to my
expectation and as per proper guidelines issued by C.B.S.E.

Archana Agarwal External Examiner


PGT Computer Science
Teacher

Acknowledgment
I would like to express my deepest appreciation to my teacher
Mrs Archana Agarwal who provided me the golden opportunity
to do this wonderful project of Computer Science.

I also thank my parents who motivated and supported me


throughout the course of project. And my friends who helped me in
this project.

Lastly, I would like to thank my classmates who helped me in


finalizing this project within the given time frame.

Index

⮚ Certificate
⮚ Acknowledgment

⮚ Introduction

⮚ Abstract

⮚ System Requirements

⮚ How to use?

⮚ Menu Design

⮚ Source Code

⮚ Input and Output Screen

⮚ Files

⮚ Limitations & Enhancement

⮚ Bibliography

Introduction

In a world filled with distractions and increasing demands on our


time, staying organized and productive is a constant challenge. The
To-do List Management System project is your ally in this quest,
offering a seamless and user-friendly solution for managing your
tasks and responsibilities. Whether you're a professional aiming to
meet deadlines, a student striving for academic excellence, or
simply someone looking to regain control of your daily life, To-do
List Management System has you covered. With its intuitive
features, customization options, and the ability to track your
progress, To-do List Management System equips you with the tools
you need to turn your to-do list into a well-managed action plan.
Say goodbye to the chaos of forgotten tasks and hello to a more
organized and efficient way of managing your daily workload with
the To-do List Management System project.

Abstract

The To-Do List Management System is a robust and user-friendly


software application designed to facilitate effective task management
for individuals seeking to enhance their productivity and organization.
This project offers a range of features and functionalities that empower
users to create, track, and manage their daily tasks seamlessly.

The system incorporates user account management, allowing users to


sign up with unique usernames and passwords. Upon login, users are
presented with a menu-driven interface that offers a selection of
actions, including viewing, adding, marking completed, and removing
tasks from their to-do lists. Each task can be categorized and associated
with specific dates for a more organized approach.

The application not only assists users in creating and modifying tasks
but also stores and retrieves these tasks for future reference. It ensures
that users' to-do lists persist across sessions, enabling them to maintain
their task lists over time. The system offers a straightforward, yet
efficient, solution for users to manage their daily commitments and
streamline their productivity.

Overall, the To-Do List Management System is a valuable tool that


helps individuals regain control of their tasks, ensuring that they can
tackle their responsibilities with increased efficiency and organization.
This project serves as a practical and convenient solution for anyone
looking to enhance their daily task management capabilities.

System Requirements

⮚ OS: Windows (7 or higher) Recommended

⮚ 32-bit operating system (or higher) Recommended


⮚ Storage: At least 50 MB

⮚ RAM: 2GB (or higher) Recommended

⮚ Python 3.11 (or higher) Recommended

How to Use?

Installation: - Before running the program, Python 3.11 (or higher) or


any other IDE must be installed
Getting Started: - The application starts with the home page which
prompts you the options of Log in, Sign up or Exit the application.
Select your required option & the program gets started.

Menu Design

Home Page: -
Upon Log in: -

Upon Sign up: -

Source Code

import tkinter as tk
from PIL import ImageTk, Image
import time

root = None

def sign_up(event=None):

global root

root.destroy()
while True:
us = input("Enter username to sign up: ")
print()
if us == "":
print("Please enter a valid username")
print()
continue
else:
break

with open("Users.txt", 'a+') as F:


F.seek(0)
rd = F.readlines()
for i in rd:
srd = i.split('\t')
if us in srd:
print("User already exists")
print()
break
else:
while True:
ps = input("Enter password: ")
print()
if ps == "":
print("Please enter a valid password")
print()
continue
else:
break
eus = us + '\t' + ps + '\n'
F.writelines(eus)
print("Successfully signed up user")
print()
log_sin()

def log_in_main(event=None):

global root

root.withdraw()

def find_date(username):
a = username
with open(f"{a}.txt", 'a+') as F:
F.seek(0)
b = F.readlines()
if b == []:
print("For using the To-do list, you should have dates, so
please enter some of them!!")
print()
with open(f"{a}.txt", 'a+') as F1:
F1.seek(0)
lst = []
while True:
c = input("Enter a Date: ")
print()
st = c + '\n'
lst = lst + [st]
ch = input("Do you want to continue? (Y/N) ")
print()
if ch != "Y":
break
F1.writelines(lst)
print("Now the following dates have been added")
print()
F1.seek(0)
nb = F1.readlines()
for i in nb:
print(i)
ch = input("Enter the date to see/modify the list: ")
print()
else:
print("The following dates are already present")
print()
for i in b:
ni = i.split('\n')
print(ni[0])
print()
while True:
ch = input("Do you want to add some more dates? (Y/N) ")
print()
if ch == "Y":
with open(f"{a}.txt", 'a+') as F1:
lst = []
while True:
c = input("Enter a Date: ")
print()
st = c + '\n'
lst = lst + [st]
ch = input("Do you want to continue? (Y/N) ")
print()
if ch != "Y":
break
F1.writelines(lst)
print("Now the following dates have been added")
print()
F1.seek(0)
nb = F1.readlines()
for i in nb:
print(i)
while True:
print()
ch = input("Enter the date to see/modify the
list: ")
print()
adf = ch + '\n'
if adf in b:
return ch, a
else:
print()
print("Please enter a valid date")
print()
continue
elif ch == "N":
while True:
ch = input("Enter the date to see/modify the list: ")
print()
adf = ch + '\n'
if adf in b:
return ch, a
else:
print("Please enter a valid date")
print()
continue

else:
print("Please enter a valid choice")
print()
continue

def log_in():

with open("Users.txt", 'r') as F:

while True:

F.seek(0)

us = input("Enter username for log in: ")


print()

rd = F.readlines()
for i in rd:
srd = i.split('\t')
if us in srd:
while True:
ps = input("Enter password: ")
print()
nps = ps + '\n'
if nps != srd[1]:
print("Please enter the correct password")
print()
continue
else:
return us
else:
print("This username is not present in our database.")
print("Please sign up for this username!!")
print()
continue

a = log_in()
b = find_date(a)
to_do_list_programming(b[0], b[1])

def exit_app(event=None):
global root

root.destroy()
print("Thanks for using the application!! Have a great Day!!")

def to_do_list_programming(date_file, username):


tasks = []
df = date_file
us = username

global root

def load_tasks():
try:
with open(f"{df}_{us}.txt", "a+") as F:
F.seek(0)
tasks.extend([line.strip() for line in F])
except FileNotFoundError:
print("File not found")

def save_tasks():
with open(f"{df}_{us}.txt", "w") as F:
for task in tasks:
F.write(f"{task}\n")

def show_tasks():
if tasks == []:
print("No tasks in the list.")
else:
print("Tasks:")
task_number = 1
for task in tasks:
print(f"{task_number}. {task}")
task_number += 1
print()

def add_task():
task = input("Enter the task: ")
print()
tasks.append(task)
print("Task added!")
print()
save_tasks()

def mark_completed():
show_tasks()
if not tasks:
return
task_index = int(input("Enter the task number to mark as
completed: ")) - 1
print()
if 0 <= task_index < len(tasks):
if not tasks[task_index].startswith("[Completed]"):
tasks[task_index] = f"[Completed] {tasks[task_index]}"
print("Task marked as completed!")
print()
save_tasks()
else:
print("Task is already marked as completed.")
else:
print("Invalid task number.")
print()

def update_task():
show_tasks()
if not tasks:
return
task_index = int(input("Enter the task number to update: ")) - 1
if 0 <= task_index < len(tasks):
updated_task = input("Enter the updated task: ")
tasks[task_index] = updated_task
print("Task updated!")
print()
save_tasks()
else:
print("Invalid task number.")
print()

def remove_task():
show_tasks()
if not tasks:
return
task_index = input("Enter the task number to remove: ")
if not task_index.isdigit():
print("Please enter a valid task number.")
return
task_index = int(task_index) - 1
if 0 <= task_index < len(tasks):
removed_task = tasks.pop(task_index)
print(f"Task '{removed_task}' removed!")
print()
save_tasks()
else:
print("Invalid task number.")
print()

load_tasks()

while True:
print("Menu:")
print("1. Show Tasks")
print("2. Add Task")
print("3. Mark Completed")
print("4. Remove Task")
print("5. Update Task")
print("6. Exit this menu")
print()

choice = input("Enter your choice: ")


print()

if choice == '1':
show_tasks()
elif choice == '2':
add_task()
elif choice == '3':
mark_completed()
elif choice == '4':
remove_task()
elif choice == '5':
update_task()
elif choice == '6':
save_tasks()
time.sleep(2)
root.deiconify()
break

def log_sin():

global root

time.sleep(2)

root = tk.Tk()
root.title("To-do List Management System")
root.geometry("1300x650")

my_can = tk.Canvas(root, width=1300, height=700)


my_can.place(x=-1, y=-1)

img = Image.open("My Image.png")


res_img = img.resize((1300, 650))
bg_img = ImageTk.PhotoImage(res_img)
bg = my_can.create_image(0,0, image=bg_img, anchor=tk.NW)
img1 = ImageTk.PhotoImage(Image.open("Log in.png"))
img2 = ImageTk.PhotoImage(Image.open("Sign up.png"))
img3 = ImageTk.PhotoImage(Image.open("Exit.png"))

btn1 = my_can.create_image(775,450, image=img1)


btn2 = my_can.create_image(1125,450, image=img2)
btn3 = my_can.create_image(950,550, image=img3)

my_can.tag_bind(btn1, "<Button-1>", log_in_main)


my_can.tag_bind(btn2, "<Button-1>", sign_up)
my_can.tag_bind(btn3, "<Button-1>", exit_app)

root.mainloop()

log_sin()

Input and Output Screen

Firstly when sign up is clicked on tkinter screen


Secondly when log in option is clicked on tkinter screen
Lastly when exit is clicked on tkinter screen

Data Dictionary
“Users.txt” (which contain all the signed up users)

“udayboyal.txt” (which contain dates for to-do programming)

“11-11-23_udayboyal.txt” (which contain to-do programming)


The above photo is “My Image.png” save this image as PNG, i.e.,
Portable Network Graphics to the path where the programme given
above is saved.

The above photo is “Exit.png” save this image as PNG, i.e., Portable
Network Graphics to the path where the programme given above is
saved.

The above photo is “Log in.png” save this image as PNG, i.e., Portable
Network Graphics to the path where the programme given above is
saved.

The above photo is “Sign up.png” save this image as PNG, i.e.,
Portable Network Graphics to the path where the programme given
above is saved.
Limitations & Enhancements

⮚ There is no constraints for password entered by user.

⮚ You have to log in again and again for editing dates, i.e., after
exiting the to-do list's functioning, then the dates will not show
again and you have to login again to modify other dates.

⮚ In the log-in function, the Tkinter screen is temporarily hidden


during script execution and reappears upon exiting the to-do list
functionality. On the other hand, the sign-up function destroys and
recreates the Tkinter screen after completing the sign-up process.

⮚ Consider implementing a check for the required libraries at


the beginning of the program, providing a user-friendly error
message if any library is missing.

⮚ The program assumes that the required images are saved in


the same path as the program. If the images are not found in
this location, errors may occur during program execution.

⮚ Implementing additional security measures, such as multi-factor


authentication, might be out of scope for this project.

⮚ Creating a mechanism for users to recover their accounts in case


of a forgotten password or username, might be considered out of
scope for this project.

⮚ Setting reminders for the completing the task is to be added.

⮚ Account lockout mechanism (i.e., account will be locked after


repeated failed login attempts) is to be added.
Bibliography

⮚ Computer Science textbook for class XII by Sumita Arora

⮚ Graphics module (tkinter):


1. https://www.geeksforgeeks.org
2. https://stackoverflow.com
3. www.youtube.com/@Codemycom
4. www.youtube.com/@programmed2code

You might also like