Home / Programming MCQs / Python MCQs / Question

R

Ram Sharma • 188.81K 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

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.