Question Detail

COS 102 6 lecture note; fundamentals of programming Objective Question

Question

In Python's if-elif-else conditional construct, what follows each condition?
Options
A A semicolon (;)
B A comma (,)
C A colon (:)
Correct Answer
D A period (.)
Correct Answer

Option C is the correct answer.

Detailed Explanation

Slide 41 explicitly shows the structure of the if-elif-else statement and has a callout ': Colon Must' pointing to the colon after the condition.

Hint

Observe the syntax shown for the conditional construct on slide 41.

Question Info