CODING
ADVENTURE
0 / 12 completed

FIELD NOTE 01 / BEGINNER PYTHON

What is a program? Start here.

A program is a set of instructions a computer can carry out. An algorithm is the plan behind those instructions. Python is one language for expressing that plan.

The idea

Imagine giving a friend directions to Tony’s shop. “Go there” is too vague; “walk two blocks, then turn left” gives them something to do. A program needs similarly explicit steps. The computer does not know what you intended—it follows the instructions you actually wrote. An interpreter is software that runs your Python program. This website includes one, so you can experiment without installing anything.

A tiny experiment

PYTHON 3PREDICT BEFORE YOU RUN
name = "Christine"
print("Hello, " + name)
print("Let us find the first clue.")
Run and change this example ↗
Reveal the expected output
Hello, Christine
Let us find the first clue.

Read it one step at a time

  1. The first line gives the name name a text value. It does not display anything yet.
  2. The second line calls print: the parentheses contain what it should display. The + joins two pieces of text.
  3. The last line displays a second message. Here, the instructions run from top to bottom.

Make one change

Change the name to Dustin. Which output line will change?

Check your thinking

Only the greeting changes. The final message does not use the variable name.

Keep following the trail

Sources & further reading

Companion notes for Coding Adventure by James Colby. Historical claims link to their sources; the examples are written for this learning trail.