Solved

The Following Code Sums All the Values in the Two-Dimensional

Question 13

Multiple Choice

The following code sums all the values in the two-dimensional array. What is the missing code?
Sum = 0
For row in range(grid.getHeight() ) :
For column in range(grid.getWidth() ) :
< missing code >


A) sum += grid[ column ][ row ]
B) sum += grid[ row-1 ][ column-1 ]
C) sum += grid[ column+1 ][ row+1 ]
D) sum += grid[ row ][ column ]

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions