Bird
0
0

Identify the error in this code:

medium📝 Debug Q7 of 15
Python - Variables and Dynamic Typing
Identify the error in this code:
score = 15
print(scor)
AIncorrect assignment operator
BMissing quotes around 'score'
CVariable name 'scor' is not defined
DPrint statement syntax error
Step-by-Step Solution
Solution:
  1. Step 1: Check variable names

    The variable defined is score, but scor is used in print.
  2. Step 2: Understand the error

    Using an undefined variable name causes a NameError in Python.
  3. Final Answer:

    Variable name 'scor' is not defined -> Option C
  4. Quick Check:

    Variable names must match exactly [OK]
Quick Trick: Check spelling of variable names carefully [OK]
Common Mistakes:
MISTAKES
  • Typo in variable names
  • Using variables before assignment
  • Confusing similar variable names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes