Write the output from the following code:
s=0
for I in range( 10,2,-2):
s+=I
print "sum= ",s
Answers
Answered by
5
Explanation:
28 is the answer..I guess..
plz comment of I am wrong..
I am also eager to know the answer..
Answered by
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
English,
4 months ago
Computer Science,
4 months ago
Math,
4 months ago
Math,
9 months ago
History,
9 months ago