python · level 1 · unit 1 · lesson 4
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
An is a clue, not a disaster.
An error is Python saying it got stuck. Everyone gets them, even experts. Read the last line of the message first: it names the problem.
A means Python cannot read your code, like a sentence with words missing. Often a quote mark or a bracket has gone astray.
A means Python met a word it does not know. Python is , so Print with a capital P is a stranger to it.
The message also tells you which line to look at, so start your search there.
guess first
One capital letter. What happens?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
Print("Hello!")
your turn
Your turn. Close everything you open.
Type your superpower in place of the blank. Then finish the line so the quote and the bracket are both closed, and press run.
fix it
Breakfast is broken. Can you fix it?
- Read the last line of the error. Which kind of error is it, and which line?
- It is a SyntaxError on line 2. Count the quote marks on that line.
- A string needs a quote at both ends. Add " before Come, then press run.
nailed it
you turned errors into clues. :D
- Errors are clues. Read the last line first.
- A SyntaxError often means a missing quote or bracket.
- Python is case-sensitive:
printworks,Printdoes not.
new words in your collection
- error
- SyntaxError
- NameError
- case-sensitive
This lesson isn’t saved. A free account remembers every lesson you finish.