Question Detail
Question
Which Python code snippet correctly performs a *comparison* to check if the `age` variable is 18?
Correct Answer
Option B is the correct answer.
Detailed Explanation
Page 14, 'Mistake #1: = vs ==' slide, clearly distinguishes between '=' for Assignment and '==' for Comparison. The 'CORRECT' example uses
if age == 18:.
Hint
Remember the fundamental difference between assigning a value and checking for equality. One uses a single character, the other uses two.