R
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)
c=0
while(n):
if(n>5):
c=c+n-1
n=n-1
else:
break
print(n)
print(c)
- Correct Answer - Option(A)
- Views: 146
- Filed under category Python
Discusssion
Login to discuss.