C-17-Q013mediummulti_combo_mcq
Two statements are correct about the if...else construct:
Two statements are correct about the if...else construct:
- A colon is placed after the
ifcondition - A colon is placed after
else - Curly braces enclose each block
- ai and ii
- bi and iii
- cii and iii
- di, ii, and iii
ব্যাখ্যা
In Python a colon is required after both the if condition and the else keyword to introduce their indented blocks, so statements i and ii are correct. Statement iii is wrong because Python uses indentation, not curly braces, to delimit blocks.