Addaly is in open beta. Things will change, and AI answers can be wrong — check anything that matters.

Python, From Zero, For AI

From your first line of code to your first API call.

Nothing assumed10 lessons69 min of readingFree, no sign-up to read

Ten lessons that take someone who has never written a line of code to the point of calling an AI API from their own Python script. Every lesson has code you can paste into a terminal and run, and every lesson ends with a question about what the code actually does. It covers what a program is, variables and types, strings and input, lists and dicts, loops, functions, reading error messages properly, files, packages and virtual environments, and a first real HTTP request. No prior programming, no maths beyond addition, no assumptions about which country you learned in.

Start the first lesson
  1. 1What a program is, and running your first line6 minA program does exactly what is written, in order, and shows you only what you ask it to show.
  2. 2Variables, and the fact that everything has a type6 minA name is attached to a value at the moment the line runs, and the value's type decides what operators do.
  3. 3Strings, and why input() always hands you text6 mininput() always returns text, so convert it the moment it arrives or you will compare numbers alphabetically.
  4. 4Lists and dicts, and knowing which one you need7 minA list is positions in order; a dict is named slots, and one name means exactly one slot.
  5. 5Loops, or doing the same thing to many things6 minIndentation decides what repeats, so where you start the running total decides whether the answer is a sum.
  6. 6Functions, and the difference between printing and returning7 minprint shows a value to a person; return hands it to the program, and a function without return gives back None.
  7. 7Reading an error message properly9 minRead a traceback bottom line first for what broke, then the lowest block of your own code for where.
  8. 8Files, and keeping data after the program ends6 minOpening a file with mode w empties it first, so use a when you mean to add.
  9. 9Installing packages, and why virtual environments exist7 minA virtual environment is a per-project folder of packages, and activation lasts only for one terminal session.
  10. 10Calling an API for the first time9 minThe status code tells you the request and reply worked; only the body tells you what the answer says.

No ads. No data sale. No public scores on people. Ever.

© 2026 Addaly

Python, From Zero, For AI · Addaly