Python_Institute
PCEP-30-02 · Question #303
How many stars will the following snippet send to the console? i = 2 while i >= 0: print("*") i -= 2
The correct answer is B. two. See the full explanation below for the reasoning.
Question
How many stars will the following snippet send to the console?
i = 2
while i >= 0:
print("*")
i -= 2
Options
- Athree
- Btwo
- Cone
How the community answered
(52 responses)- A8% (4)
- B77% (40)
- C15% (8)
Community Discussion
No community discussion yet for this question.