C-18-Q029mediumsingle_mcq
Which Python statement is missing from count=1 followed by while (count<=3): print('ICT') to avoid an infinite loop?
Which Python statement is missing from count=1 followed by while (count<=3): print('ICT') to avoid an infinite loop?
- a
count=count+1 - b
print(count) - c
if count: pass - d
return count
ব্যাখ্যা
Without count=count+1, the counter never changes, so count<=3 stays true forever and the loop never ends. Adding count=count+1 increases the counter each pass so the condition eventually becomes false.