What will the following code result in?

2023

What will the following code result in?

  1. A.

    [-2 -3]

  2. B.

    [12 23] [10 20]

  3. C.

    [10 20] [12 23]

  4. D.

    [2 3]

Attempted by 1362 students.

Show answer & explanation

Correct answer: D

NumPy performs element-wise subtraction, so [12−10, 23−20] = [2, 3].

Explore the full course: Bpsc