Micro Project
Micro Project
MICRO PROJECT
Project Title:
"To-Do List Application using Python"
Submitted By:
• Jayveer Vora (Roll No: 246170307233)
• Bhavesh Shimpi (Roll No: 246170307197)
Code : Code to make Todo list.
Output:
Explanation :
In theory, the code implements a basic console-based To-Do List
application using Python. Here's a high-level theoretical
explanation of what happens in the code:
Objective:
The program allows users to:
• Add tasks to a list.
• Delete tasks from the list.
• View all tasks.
• Exit the application.
How it works:
1. Initialization:
o An empty list tasks = [] is created to store to-do items.
2. Function Definitions:
o add(): Adds a user-entered task to the tasks list.
o delete(): Removes a task from the list if it exists;
otherwise, it notifies the user.
o show(): Displays all the tasks currently in the list.
3. User Interface Loop:
o The program enters an infinite while True loop.
o It shows a menu with 4 options:
1. Add task
2. Delete task
3. List tasks
4. Quit
4. User Input Handling:
o Based on the user's input (choice), the corresponding
function is called.
o If the user enters:
▪ "1" → the add() function is executed.
▪ "2" → the delete() function is executed.
▪ "3" → the show() function is executed.
▪ "4" → the loop breaks and the app exits.
▪ Any other input → displays an error message
prompting valid input.
5. Execution Flow:
o The loop continues to run, allowing the user to perform
multiple operations until they choose to quit.