InterviewSolution
Saved Bookmarks
| 1. |
Write the output of the following codeA = [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 |
|