"# Task-manager-App" This Repo contains a Python code which defines a simple task manager program that allows users to add tasks, view all tasks, mark tasks as completed, and exit the program. Let's break down the code:
Add_task(tasks): This function prompts the user to enter the name of a task, appends the task to the tasks list as a dictionary with keys "name" and "completed", and sets "completed" to False by default. 2.view_tasks(tasks): This function displays all tasks stored in the tasks list. It iterates through the list and prints each task's name and its completion status ("Completed" or "Incomplete"). mark_completed(tasks): This function allows the user to mark a task as completed. It first calls the view_tasks() function to display all tasks, prompts the user to enter the index of the task they want to mark as completed, and updates the "completed" key of the corresponding task dictionary to True. main(): This is the main function of the program. It initializes an empty list tasks to store tasks. Inside a while True loop, it presents a menu to the user with options to add a task, view tasks, mark a task as completed, or exit the program. Depending on the user's choice, it calls the appropriate function. if name == "main": This conditional statement ensures that the main() function is executed only if the script is run as the main program (not imported as a module into another script). Overall, this script provides a basic command-line interface for managing tasks. Users can add tasks, view existing tasks, mark tasks as completed, and exit the program.