πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      Given a 2D array (matrix) in Python: matrix =

      [[1, 2, 3], [4, 5, 6], [7, 8, 9]] What are the values of matrix[1][2] and matrix[2][0] respectively?
      A 5 and 7 Correct Answer Incorrect Answer
      B 6 and 7 Correct Answer Incorrect Answer
      C 4 and 8 Correct Answer Incorrect Answer
      D 2 and 9 Correct Answer Incorrect Answer
      E 3 and 1 Correct Answer Incorrect Answer

      Solution

      Correct Answer: B (matrix[1] is [4, 5, 6], so matrix[1][2] is 6. matrix[2] is [7, 8, 9], so matrix[2][0] is 7.)

      Practice Next
      ask-question