Computer Science, asked by Anonymous, 10 months ago

Write the output of the following code [CBSE Text Book]

A = [2, 4, 6, 8,10]
L = len (A)
S = o
for I in range (1, L, 2):
S + = A[I]
print “Sum=”, S

Answers

Answered by kavitatyagi79
1

Answer:

Check it on google hope it will help you

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
1

Solution :-

A = [2, 4, 6, 8,10]

L = len (A)

S = o

for I in range (1, L, 2):

S + = A[I]

print “Sum=”, S

Answer:

Sum = 12

Justification:

A[1] = 4 step size = 2

A[3] = 8

S = 4 + 8 = 12

Similar questions