Question Detail
Question
What is the primary purpose of indentation in Python `if` statements?
Correct Answer
Option B is the correct answer.
Detailed Explanation
Page 6, 'The "If" Syntax' slide, states under 'Indentation:' that 'The "action" must be spaced in!'. Page 15, 'Mistake #2: Colon & Indent', further clarifies: 'Python uses whitespace to know what code belongs to the if block.' Indentation is crucial for defining code blocks in Python.
Hint
Recall the 'Indentation' rule and its significance for Python code blocks, as highlighted in the syntax and common mistakes sections.