πŸ“Š Python
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) 5 11

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
243
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
88%
Success Rate