Question: What is the value stored in the variable answer at the end of executing the following snippet? answer=1 n=0 while(n <3): answer=answer*3 n=n+1

What is the value stored in the variable answer at the end of executing the following snippet?
answer=1
n=0
while(n<3):
answer=answer*3
n=n+1

Step by Step Solution

3.33 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

while 0 3 ans0 n1 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!