English

Write the output from the following code: n = 50 i = 5 s = 0 while i<n: s+ = i i+ = 10 print "i=",i print "sum=",s

Advertisements
Advertisements

Question

Write the output from the following code:

n = 50
i = 5
s = 0
while i<n:
      s+ = i
      i+ = 10
print "i=",i
print "sum=",s
Code Writing
Advertisements

Solution

i=  55
sum=  125
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Review of Phython - EXERCISE [Page 24]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 1 Review of Phython
EXERCISE | Q 1. d. | Page 24
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×