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
name = "Christine"
print("Hello, " + name)
print("Let us find the first clue.")Reveal the expected output
Hello, Christine Let us find the first clue.
Read it one step at a time
- The first line gives the name name a text value. It does not display anything yet.
- The second line calls print: the parentheses contain what it should display. The + joins two pieces of text.
- 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.