Learn Python by building a personal teaching app


Before you start

Follow these instructions to install Python and VS Code, and create a GitHub repository for your app.

You should also read the guide to using AI as a Learning Companion, get familiar with some useful terminal commands, and learn how to save your code to GitHub with the Git workflow.

Recommendations for how to work through the course

Work through the exercises in order, modifying the same Python file (e.g. flashcard_app.py).

You should also feel free to create additional .py files to practice different skills and experiment with bits of code without having to worry about affecting your app.

You can choose how many exercises you do a day, but try to treat each one as a self-contained unit (so even if you need to take breaks within the exercise, make sure you also take a proper break after you complete the exercise).

Depending on how you like to learn, you may prefer to:

  • Read first, then do: Read through the guides (linked in each exercise) before attempting the tasks; or

  • Do first, then understand: Dive straight into the tasks and refer to the guides when you get stuck.

In either case, after each exercise:

  • Run and check your code runs as demanded by the tasks.
  • Read through the code you have written and make sure you understand it.
  • Add comments (you will learn about what these are) that allow you (and anyone reading your code) to understand what you have done.
  • Commit your code and push it to GitHub with the standard Git workflow you have already gone through. This gives you have an easy-to-resume checkpoint for picking things up again if you lose your work locally.
  • Read through the related guides. If you are using an AI, feel free to share the guides with them. Ask them to explain anything that isn’t clear and/or quiz you on what you should have learned.
  • Take a proper break by getting yourself a drink or going for a walk.

When you come back to the course:

  • Read through the code you have written and make sure you understand it.
  • Run and check your code still runs as expected.

You might also like to learn with a friend or study buddy: Partner up with a friend or another learner. Keep pace with each other and synchronise schedules. Every day or every week, read through each others’ code and ask each other questions about why you approached things a particular way (often there is no single correct answer).


Setting Up Your Workspace

  1. Open VS Code and make sure you’re in your repository folder from Lesson 0

  2. Find your python file, e.g. flashcard_app.py in the Explorer panel (you created this in Lesson 0)

  3. Open the file and check it still works by running in the terminal:

    python flashcard_app.py
    

    You should see your welcome message. Now you’re ready for the exercises!