It will be D as first the value is 3 so a star will be printed, then one for 2 and 1 each, then the value will be 0 so it will go in the else statement and print one start, so total 4 stars
D. 4 stars.
Please before answering try running the code first. Maybe u are forgetting that after the while loop finishes the else: print("*") will execute.
upvoted 8 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
macxsz
2 years, 7 months agoarohera
2 years, 8 months agocgranadillo
3 years, 10 months agoSanjiDiableJambe
3 years, 10 months agoarohera
2 years, 8 months agopypaul
4 years agosadako11
4 years ago