You are on page 1of 6

ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

Micro – Project On
“TO –DO LIST: USING PYTHON .”
(COMPUTER ENGINEERING)
SUBMITTED IN FULFILLMENT OF THE DEGREE OF DIPLOMA ENGINEERING

[COMPUTER ENGINEERING]

DEPARTMENT OF COMPUTER ENGINEERING

A.Y.DADABHAI TECHNICAL INSTITUTE

MAHUVEJ ROAD, B/H old MARYIAMBHAI hospital

KOSAMBA- 394120(GUJARAT)

SUBJECT NAME – INTRODUTION TO ML

SUBJECT CODE – 4350702

SUBMITTED TO: PREPARED BY:

MRS.NASRIN AGHAM. ZUVERIYA MULLA

216010307024

1
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.
ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

To-Do List Mini Project Documentation


Overview

The To-Do List mini project is a simple command-line application built in Python.
It allows users to manage their tasks by adding, viewing, and removing tasks from
a to-do list.

Features

 Show Tasks: Display the current list of tasks.


 Add Task: Add a new task to the to-do list.
 Remove Task: Remove a task from the list by specifying its number.
 Quit: Exit the application.

How to Use

1. Run the Python script in your terminal or IDE.


2. The program presents a menu with options. Choose an option by entering the
corresponding number.
 Show Tasks (Option 1): Display the current list of tasks, if any.
 Add Task (Option 2): Add a new task to the to-do list. You will be
prompted to enter the task's description.
 Remove Task (Option 3): Remove a task from the list. First, you will see
the list of tasks with their corresponding numbers. Enter the number of the
task you want to remove.
 Quit (Option 4): Exit the application.
3. After each operation (adding or removing a task), the program provides feedback
on the action taken.

4. You can continue to interact with the program until you choose the "Quit" option.

2
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.
ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

We'll implement it in a command-line interface (CLI).

Input:
# Define an empty list to store tasks

tasks = []

# Function to display the to-do list

def show_tasks():

if not tasks:

print("No tasks to display.")

else:

print("To-Do List:")

for i, task in enumerate(tasks, start=1):

print(f"{i}. {task}")

# Function to add a new task

def add_task():

task = input("Enter the task to add: ")

tasks.append(task)

print(f"Task '{task}' has been added to the list.")

# Function to remove a task

def remove_task():

show_tasks()

3
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.
ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

if tasks:

try:

task_number = int(input("Enter the number of the task to remove: "))

if 1 <= task_number <= len(tasks):

removed_task = tasks.pop(task_number - 1)

print(f"Task '{removed_task}' has been removed from the list.")

else:

print("Invalid task number. Please try again.")

except ValueError:

print("Invalid input. Please enter a valid task number.")

# Main program loop

while True:

print("\nOptions:")

print("1. Show Tasks")

print("2. Add Task")

print("3. Remove Task")

print("4. Quit")

choice = input("Enter your choice (1/2/3/4): ")

if choice == "1":

show_tasks()

elif choice == "2":

add_task()

4
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.
ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

elif choice == "3":

remove_task()

elif choice == "4":

print("Goodbye!")

break

else:

print("Invalid choice. Please try again.")

Output:

5
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.
ER_NO:216010307024 NAME:MULLA ZUVERIYA BATCH:C01

Conclusion:
In conclusion, the To-Do List mini project is a simple yet functional command-line
application that helps users manage their tasks. It provides basic task management
features such as adding, viewing, and removing tasks. This project is a great
starting point for individuals learning Python or programming in general as it
covers fundamental concepts, including lists, loops, and functions.

While the project serves its primary purpose, there is room for enhancement and
expansion. Users can consider adding features like saving tasks to a file for
persistence, implementing due dates and priority levels, or building a graphical
user interface (GUI) for a more user-friendly experience.

This project serves as a foundation for further development and can be a valuable
learning exercise for those looking to improve their Python skills and understand
basic software development principles.

6
A.Y.DADABHAI TECHNICAL INSTITUTE, KOSAMBA.

You might also like