Python_Institute
PCEP-30-02 · Question #306
How many stars will the following code send to the monitor? x = 0 while x < 6: x += 1 if x % 2 == 0: continue print('*')
The correct answer is C. three. See the full explanation below for the reasoning.
Question
How many stars will the following code send to the monitor?
x = 0
while x < 6:
x += 1
if x % 2 == 0:
continue
print('*')
Options
- Aone
- Btwo
- Cthree
- Dzero
How the community answered
(20 responses)- A5% (1)
- B5% (1)
- C80% (16)
- D10% (2)
Community Discussion
No community discussion yet for this question.