Python_Institute
PCEP-30-02 · Question #315
How many stars will the following snippet print to the monitor? ``python for i in range(1): print('') else: print('*') ``
The correct answer is C. two. See the full explanation below for the reasoning.
Question
How many stars will the following snippet print to the monitor?
for i in range(1):
print('*')
else:
print('**')
Options
- Athree
- Bone
- Ctwo
- Dzero
How the community answered
(29 responses)- A3% (1)
- B17% (5)
- C69% (20)
- D10% (3)
Community Discussion
No community discussion yet for this question.