Skip to main content
← CoursesPython FoundationsModule 1 · Fundamentals of syntaxFind a bug in iffix9 / 170
💬 Discuss🧪 Playground+75 XP
Task
📝 **Task:** Find the bug in the condition. There's an error — the `if` uses assignment `=` instead of comparison `==`. 📋 **Steps:** 1. Look at `if x = 10:` — only one `=` 2. Change to two — `if x == 10:` 3. Run. It should print `Ten` 💡 **How to remember:** - one `=` → "put this value into the variable" (assignment) - two `==` → "is it equal?" (comparison) ```python score = 100 # put 100 into score if score == 100: # check: does score equal 100? print("Max") ``` ⚠️ **Hint:** Python raises `SyntaxError` for `=` inside an `if` — it's not valid syntax. 🎯 **Expected output:** `Ten`

Keep going

✏️ Write your code here
🐍
Loading Python...
First visit only — ~5-10s. Stays cached afterward.
📊 Result
Press Run to see result...
📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…