Python_Institute
PCEP-30-02 · Question #322
How many stars ('') will the following code output to the screen? n = 0 if n > 0: print("") elif n == True: print("") else: print("****")
The correct answer is D. three. See the full explanation below for the reasoning.
Question
How many stars ('*') will the following code output to the screen?
n = 0
if n > 0:
print("")
elif n == True:
print("")
else:
print("***")
Options
- Aone
- Bsix
- Ctwo
- Dthree
How the community answered
(60 responses)- A3% (2)
- B8% (5)
- C15% (9)
- D73% (44)
Community Discussion
No community discussion yet for this question.