Time to put everything together! This final project combines classes, exceptions, list comprehensions, and file handling into one complete, working task manager application.
class TaskManager: def __init__(self): self.tasks = [] def add_task(self, title): self.tasks.append(Task(title)) def complete_task(self, title): for t in self.tasks: if t.title == title: t.done = True; return raise ValueError(f"Task not found: {title}") def pending_count(self): return len([t for t in self.tasks if not t.done])
Console initialized...
Ready for Final Project: OOP Task Manager
> This is the capstone project — take your time!
> Test with "Check My Code" when ready.
> Complete the course once it passes!