emkbt / DT--Kilbertus--5--ToDoList--

A simple console-based Todo List application where you can add, delete, complete tasks.
MIT License
0 stars 1 forks source link

fix bug issue #12

Open meyronin opened 7 months ago

meyronin commented 7 months ago

The complete_task method in the TodoList class has a bug. When completing a task, the function prints the completion message regardless of whether the task is found or not. This can be misleading, as the message implies that the task has been completed even if it doesn't exist.

Steps to Reproduce:

Add a task using option 1. Try to complete a non-existent task using option 3. Expected Behavior: The system should print an appropriate message if the task is not found.

Actual Behavior: The system prints the completion message even if the task is not found.

Proposed Fix: Update the complete_task method to print the completion message only if the task is found.