Multiple choice

What is the expression after an if statement always followed by? A...

  1. semicolon and curly braces

  2. semicolon and four white spaces on the next code block

  3. colon and four spaces of white space on the next code block

  4. colon and two spaces of white space on the next code block

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Python, an 'if' statement must end with a colon (:), and the subsequent block of code must be indented, typically by four spaces.