A free course, written in public

Python for Humans

Start coding in your browser, then build Python projects on your own computer.

This course is a work in progress.

Contents

Chapters go up here as they're written. Each post is a draft, with its version and date on the page.

Introduction draft v0.5

Part I · Python fundamentals

Thinking in code

Python runs in the page, so there's nothing to install. Small programs that talk, count, decide and repeat; then lists, dictionaries and functions, put to work on pizza orders, high scores and the complete works of Shakespeare. Finish by generating new Shakespeare with your own code.

  1. 1 Strings, Strings, Strings Change, search, and build text with string methods and f-strings. v0.4
  2. 2 Numbers Integers, Floats & Arithmetic v0.1
  3. 3 Making Decisions If & Conditionals v0.3
  4. 4 Loops While & For Loops v0.7
  5. 5 Keeping Things Together Lists & Indexing v0.4
  6. ↳ Tic-Tac-Toe: Your Move project
  7. 6 Reading a File Text Files & Strings v0.4
  8. 7 Keeping Count Dictionaries & Key–Value Pairs v0.2
  9. 8 Shakespeare's Favorite Words Sorting, Sets & Tuples coming
  10. ↳ Hangman optional project · coming
  11. 9 Giving Code a Name Functions & Return Values v0.2
  12. ↳ Tic-Tac-Toe: Three in a Row project
  13. 10 Try Again Handling Bad Input coming
  14. 11 The Word-Prediction Generator Randomness & Text Generation v0.3
  15. ↳ Tic-Tac-Toe: Meet Your Opponent project
  16. ↳ Tic-Tac-Toe: Can You Beat It? optional project
  17. ↳ Text Adventure: Explore the Castle optional project

Part II · Data science and machine learning

Data and models

For anyone who has finished Part I. Still in the browser, now in a notebook. Load a real dataset, ask it questions and draw a chart, train your first model, teach Python to spot spam, and finish with a tiny neural network that learns Shakespeare.

  1. 12 Meet the Notebook Notebooks & Tables coming
  2. 13 Explore Real Data Data Science v0.2
  3. 14 Train Your First Model Machine Learning v0.2
  4. 15 Teach Python to Spot Spam Text Classification v0.2
  5. 16 A Tiny Neural Network Neural Networks coming

Part III · Installing and running Python

Your own computer

For anyone who has finished Part I. Install Python and take your programs out of the browser, then save what you make to your own files. Games and the web both start from here.

  1. 17 Keeping Your Work Local Python & Saved Programs v0.2
  2. 18 Save What You Make Paths & File Handling v0.2
  3. ↳ Text Adventure: Save Your Adventure optional project
  4. ↳ Automate an Expense Report project

Part IV · Classes and Pygame

Games

For anyone who has finished Part III. Build a card game with classes, then an arrow-key game with falling blocks and a space game where you shoot asteroids.

  1. 19 A Card Game Objects, Attributes & Methods v0.1
  2. ↳ Text Adventure: Meet the Castle's Characters optional project
  3. 20 Dodge the Blocks Games v0.2
  4. 21 Asteroid Field Games coming

Part V · Live data and APIs

The web

For anyone who has finished Part III. Fetch live data from other people's services, then put your own code on the web with a small API.

  1. 22 Live Data Dependencies & API Requests v0.1
  2. 23 Your First API APIs & Visualization v0.2
Where Next draft v0.2
Will Vincent

Who am I?

Hi, I'm Will Vincent. I'm a Python Software Foundation Fellow, a former board member of the Django Software Foundation, author of Django for Beginners, and co-host of the Django Chat podcast.

I've taught Python and web development to thousands of developers through my books, tutorials and courses. I believe in learning the fundamentals properly: understanding how code works, not just copying what an AI suggests.