Home / Programming MCQs / Python MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q. What will be the output of given Python code?

Code:
n=7

c=0

while(n):

    if(n>5):

        c=c+n-1

        n=n-1

    else:

        break

print(n)

print(c)
(A) 5 11
(B) 5 9
(C) 7 11
(D) 5 2

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.