Project Level 2: Intermediate
This project is designed for intermediate learners who know Python fundamentals and are practicing building complete programs.
Project Description
Create a console-based task manager app where users can add, complete, and view tasks.
How the Project Works
When the program runs, the user is prompted to choose one of the options (add, complete, view task, or exit the program). If the user chooses to add a task, they submit “1” and then type in the task. The user can also view the tasks. Tasks that are not completed are shown with an ❌ next to them. After the user completes a task, a ✔️ is shown next to the task when the user views the tasks.
Please use OOP/classes to build the program. Below is a structure to get you started and in the “Show Code” button you will find the complete solution.
class Task:
def __init__(self, description):
self.description = description
self.is_completed = False
def mark_completed(self):
self.is_completed = True
...
class ToDoList:
def __init__(self):
self.tasks = []
def add_task(self):
description = input("Enter the task description: ")
...
def complete_task(self):
self.view_tasks()
...
def view_tasks(self):
...
def run(self):
...
if __name__ == "__main__":
todo_list = ToDoList()
todo_list.run()
You can save the tasks in variables instead of external files/databases to keep the solution simple.
Prerequisites
Required Libraries: No libraries are required.
Required Files: No files are required.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
Once you code the project, compare it with our solution below: