Find Mistake: Missing Colon
Find the Mistake Beginner
Question
This code has a syntax error. What is wrong?
Code
if x > 5
print("big")
Hint
Look at the end of the first line.
Explanation
The if statement is missing a colon after the condition. Python requires a colon at the end of if, for, while, and def lines. The fix is: if x > 5:
Related Resources
Related Lessons
- Conditions and Loops
if statement syntax.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.