Exam PCAP All QuestionsBrowse all questions from this exam
Question 47

How many stars (*) does the following snippet print?

    Correct Answer: D

    D

Discussion
cgranadilloOption: D

I just run this script using this console: https://www.programiz.com/python-programming/online-compiler/ Result was 4 starts Answer is D

aroheraOption: D

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

pypaulOption: C

C. Will print 3 stars

sadako11

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.

macxszOption: D

answer: D. four

SanjiDiableJambeOption: A

i dont know whats wrong with these answers but its A. '+=', '-=' , '*=' , '/=' are not supported in python

arohera

they all are supported in python