C-16-Q111mediumsingle_mcq
Which Python statement is used to perform an action based on a condition?
Which Python statement is used to perform an action based on a condition?
- a
for - b
while - c
if - d
def
ব্যাখ্যা
The if statement evaluates a condition and executes a block of code only when that condition is true, making it the decision-making (conditional) statement. for and while are loops, and def defines a function.