MENU
Question -

Write the output of the following code 

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

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×