R

Ram Sharma • 193.88K Points
Coach

Q. What will be the values of var1 and var2 after the execution of program?

Code:
var=3

var1=0

var2=var1+1

while(var<7):

var2=var2+var1

if(var1%2==0):

var=var+1

var1=var1+1

else:

var2=var2*var1

var1=var1+3
  • (A) 12,648
  • (B) 13,648
  • (C) 13,660
  • (D) 9,72
  • Correct Answer - Option(C)
  • Views: 148
  • Filed under category Python

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.


Question analytics