Question: Problem 5 : Simple To - Do List Application Write a program that manages a simple to - do list for tasks. Create a function

Problem 5: Simple To-Do List Application
Write a program that manages a simple to-do list for tasks.
Create a function display_todo_list(todo_list) that takes a list of tasks and prints each task with its index number.
Use a loop to display a menu of options:
Option 1: Add a taskOption 2: Remove a taskOption 3: View all tasksOption 4: Exit
For adding a task, prompt the user to enter the task name and append it to the list.
For removing a task, display the current list and prompt the user to enter the index of the task they want to remove.
The program should keep looping until the user selects Exit.
Menu:
1. Add a task
2. Remove a task
3. View all tasks
4. Exit
Enter your choice: 1
Enter the task: Buy groceries
Enter your choice: 1
Enter the task: Clean the house
Enter your choice: 3
To-Do List:
0: Buy groceries
1: Clean the house
Enter your choice: 2
Enter the index of the task to remove: 0
Enter your choice: 3
To-Do List:
#0: Clean the house
Enter your choice: 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!