Computer Science, asked by jsasbr59299, 10 months ago

Write the output from the following code:
s=0
for I in range( 10,2,-2):
s+=I
print "sum= ",s

Answers

Answered by tripathiyashi419
5

Explanation:

28 is the answer..I guess..

plz comment of I am wrong..

I am also eager to know the answer..

Answered by sdnt12997roopamkvbsf
1

output is 10,18,24,28

Explanation:

for i in the range 10,2,-2

then loop run from 10,8,6,4,2

s+=i

then ,frist output is 10

second output is 10+8=18

third output is 10+8+6=24

similary ,last output is 10+8+6+4=28

Similar questions