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.
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.