A

Admin • 833K Points
Coach

Q. What will be the result of following Python code snippet after execution?

Code:
str1=""

i=0

var2=1

while(i<3):

var1=1

if str1:

var2=var1*var2+5

else:

var2=var1*var2+1

i=i+1

print(var2)
  • (A) 4
  • (B) 11
  • (C) 12
  • (D) 16
  • Correct Answer - Option(A)
  • Views: 25
  • Filed under category Python
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.