C-18-Q013mediumsingle_mcq
Which symbol is placed after the condition in a Python while statement?
Which symbol is placed after the condition in a Python while statement?
- aSemicolon
; - bComma
, - cColon
: - dPeriod
.
ব্যাখ্যা
In Python, the while statement header must end with a colon :, which introduces the indented loop body. This colon is required syntax for all compound statements like while, for, and if.