programming-fundamentals
  • Introduction
  • Lesson 1
    • Writing Your First Program
    • Data Types
    • Built In Functions
    • If Statements
    • Using Git and Github
    • Primer
    • Questions
    • Tip Calculator
    • GPA Calculator (optional)
  • Lesson 2
    • Modules
    • Lists
    • Data Structures
    • More On Data Structures
    • Questions
    • Madame Zamad
    • Mad Libs
  • Lesson 3
    • While Loops
    • For Loops
    • Loops and Lists
    • Special Commands
    • Questions
    • TODO List
    • Fibonacci (optional)
  • Lesson 4
    • Functions
    • More Functions
    • Error Handling
    • File I/O
    • Questions
    • Sudoku
Powered by GitBook
On this page
  • Setup
  • Requirements
  • General
  • Loops

Was this helpful?

  1. Lesson 3

TODO List

PreviousQuestionsNextFibonacci (optional)

Last updated 5 years ago

Was this helpful?

You have probably wanted to learn how to program so that you could optimize your life, right? After all, programming is about automation. TODO lists are a great way to ensure that you are getting things done. This assignment will have you implement a simple TODO list.

Setup

Fork the following repository and clone your copy.

Open todo.py in your text editor.

I have provided a module, todo_helper that will give you the list of TODOs from a file and save them again to a file when you are done. The methods are get() and save(). There is also a function get_ch() that will read the user's input after a single character has been entered. This will be nice to use in the menu part of the program.

Requirements

General

  • ask the user if they want to:

    (a)dd
    (l)ist
    (e)dit
    (d)elete
    (q)uit
  • implement each of the above menu items using list operations (e.g. append(),

    pop(), general indexing my_list[index])

Loops

  • use a while loop to continue to show the menu after each command until q has

    been pressed (Hint: this should wrap just about all of your code)

  • use a for loop with the enumerate() function to print out all of the

    TODOs in the following format:

    0) play with glue
    1) sweep the windows
    2) run with scissors

TODO Lists