Getting started
Basic concepts: taking our first steps
Using an IDE
Objects and classes
Loops, ranges, and iterators
Working with files
Exception handling
Python data types
Course project: building a TODO application
And now what?

What we’ll build

This is where it all comes together, finally! In this section, we’ll build a command-line TODO application. Let’s first define some requirements. Besides making this TODO app at least slightly useful, we obviously have another goal here: we want to learn how to think about, write, and structure an actual program.

The following requirements describe what our program should be able to do, without specifying how it goes about doing that. Here’s a little nugget of wisdom: you’ll often notice users asking for specific implementations instead of asking for functionality. Always try to get to the core of what a user wants to achieve. In other words, try to find the what and the why, even when that user is trying to explain the how.

Here are the what’s and why’s of our TODO app:

  • Our program lets us build multiple TODO lists because we want to keep track of both personal projects and work.
  • We can add and remove items from the list because we want to get rid of the tasks that are finished.
  • If the program stops running, the list should not vanish (it must be stored somewhere), because our projects often take multiple days or even weeks to finish.

From these requirements, we can deduct some of the language features that we need:

  • We need to create lists of items
  • We need to store the data, so we could use files to do so.
  • We need to enter one or more TODO items, so the program needs to run in a loop and ask for input.
  • We need to be able to add and delete items. Perhaps we can number the items and define two commands to watch for:
    • add <the TODO item> – to add an item
    • delete <number> – to delete a specific item
  • Although it’s not specified as a requirement, we could add a 3rd command called exit, so the user can cleanly stop our application.

Obviously, this program is incredibly simple. I could think of multiple ways to improve it, using all kinds of fancy libraries. And perhaps we will do so in a follow-up course. But for now, this will be pretty challenging already, and apply much of what we’ve learned so far.