logo

Question detail

In Python, which expression accesses the value in row 2 and column 3 of a two-dimensional array called matrix, using zero-based indexing?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Data structures and abstract data types

Exam-style question

Try this first

In Python, which expression accesses the value in row 2 and column 3 of a two-dimensional array called matrix, using zero-based indexing?.

  1. A.matrix[2][3]
  2. B.matrix[3][2]
  3. C.matrix[2, 3, 0]
  4. D.matrix[23]

Model answer

What a good answer should say

  • matrix[2][3]

Explanation

Why this works

In a Python representation of a two-dimensional array, the first index selects the row and the second index selects the column. With zero-based indexing, row 2 and column 3 are written as matrix[2][3].

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.