Chapter One · From Nothing to a Running File

What Programming Is

Before any syntax, three things have to exist: an honest picture of what a program is, a working copy of Python on your computer, and the confidence to type a command into a terminal. This chapter builds all three, and ends with a file you wrote yourself, running.

Most programming courses start with syntax. This one starts a step earlier, because the first obstacles a beginner meets are rarely about the language. They are about a black window with a blinking cursor, an installer that asks questions you cannot answer, and the quiet suspicion that everyone else already knows something you were never told.

Six short topics clear that ground. What a program actually is, and why the computer follows it so literally. Why Python is a sensible first language, including what it is honestly bad at. Just enough terminal to move around and run things. Installing Python on Windows or a Mac. The interactive prompt, where you can try an idea in seconds. And your first program file: written, saved, run, changed and run again. That last loop is the whole craft in miniature.

The loop every program is made in
Write instructionsin a text file
→
Python runs themtop to bottom
→
Read the resultoutput or error
→
Change the fileand go again

Topics in This Chapter