Python_Institute
PCEP-30-02 · Question #326
How many stars will the following snippet print to the monitor? x = 16 while x > 0: print('**') x //= 2
The correct answer is D. five. See the full explanation below for the reasoning.
Question
How many stars will the following snippet print to the monitor? x = 16 while x > 0: print('**') x //= 2
Options
- Athree
- Bone
- CThe code will enter an infinite loop.
- Dfive
How the community answered
(27 responses)- A4% (1)
- B4% (1)
- C15% (4)
- D78% (21)
Community Discussion
No community discussion yet for this question.