R

Ram Sharma • 193.88K 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
  • Correct Answer - Option(A)
  • Views: 146
  • 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