Python, from Zero, for AI · Chapter 01
Getting Python running
1:49 · Narrated with a synthetic voice. Captions are available in the player.
Read the transcript
The first module gets Python onto a real machine and refuses to be precious about which one. On a laptop, install the current stable release minus one, and on Windows tick the box that says add to path. On a phone, an app that ships a genuine Python with the numerical libraries already compiled. On anything with a browser, a free notebook that starts in half a minute. Then the split that confuses everybody once: on a Mac or on Linux the command is python three, and on Windows it is usually python, and they are not the same word. If installation fights you for more than half an hour, open the browser version and start learning. The setup is not the skill. The rest of the first module is about predicting what a short program prints, which is a harder skill than writing one. Every value carries a type, and the type decides what an operator means: the star multiplies two numbers and repeats a piece of text. Whatever a person types arrives as text, so a program that compares nine with ten as text answers nine, and never complains, because it answered a different question from the one you meant. And nought point one plus nought point two is not nought point three, in Python and in every other language that uses the same sixty-four bit floating point numbers. The diagram shows exactly where those extra digits come from.