Skip to content

Sam3360/To-Do-List_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

To-Do-List_Python

This is a simple interactive to-do list application built entirely in Python for use in the command line (or terminal). It allows users to manage their tasks by adding new items, viewing existing ones, marking tasks as complete, and deleting them.

This project is an excellent exercise for beginners to understand core Python concepts like lists, loops, conditional statements, and user input/output in a practical application.

✨ Features

  • Add Task: Easily add new to-do items to your list.
  • View Tasks: Display all current tasks with their corresponding numbers.
  • Mark Task as Complete: Mark a task as done by its number (adds "(DONE)" to the task description).
  • Delete Task: Remove a task from the list using its number.
  • User-Friendly Interface: Simple numbered menu for easy navigation.
  • Persistent Session (in-memory): Tasks are stored as long as the application is running (they are cleared when the program exits).

πŸš€ How to Use

To run this To-Do List application, you'll need Python installed on your computer.

Prerequisites

  • Python 3.x (Make sure you have a recent version of Python 3 installed.)

Running the Application

  1. Save the code:

    • Save the Python code for the To-Do List (from our previous conversation) into a file named todo_list.py.
    • Place this file in a convenient folder on your computer (e.g., Documents/PythonProjects/todo-app).
  2. Open your Command Prompt / Terminal:

    • On Windows: Navigate to the folder where you saved todo_list.py in File Explorer. Click on the address bar at the top, type cmd, and press Enter.
    • On Mac/Linux: Open your Terminal application. Use the cd command to navigate to the directory where your todo_list.py file is located. For example: cd ~/Documents/PythonProjects/todo-app.
  3. Execute the Python script:

    • Once you are in the correct directory in your Command Prompt/Terminal, type the following command and press Enter:
      python todo_list.py
  4. Interact with the To-Do List:

    • The application will start, display a menu, and prompt you for a choice.
    • Type the number corresponding to the action you want to perform (e.g., 1 to add a task, 2 to view tasks).
    • Follow the on-screen instructions.
    • To exit the application, type 5 and press Enter.

🧠 Concepts Demonstrated

  • list data structure for task storage.
  • while loops for continuous program execution.
  • if/elif/else for menu navigation and conditional logic.
  • input() for user interaction.
  • print() for displaying information.
  • Basic error handling (try-except for number input, if statements for valid choices/numbers).
  • Functions (def) for organizing code into reusable blocks.

🀝 Contributing

This project is a great starting point for learning Python. Feel free to explore, modify, and improve it! Suggestions and enhancements are welcome.

πŸ“„ License

This project is open-source and available under the MIT License.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages