Array From Numerical Ranges

Qus. 1 : <p>What will be the output of the following ?</p><pre>import numpy as np<br>a = np.array( [2, 3, 4, 5] )<br>b = np.arange(4)<br>print(a+b)</pre>

  1. [2 3 4 5]
  2. [3 4 5 6]
  3. [1 2 3 4]
  4. [2 4 6 8]
Qus. 2 : <p>What will be the output of the following ?</p><pre><span style="font-size: 14px;">import numpy as np<br></span><span style="font-size: 14px;">print(np.maximum([2, 3, 4], [1, 5, 2]))</span></pre>

  1. [1 5 2]
  2. [1 5 4]
  3. [2 3 4]
  4. [2 5 4]

Programs

Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:

View Solution


Write a program to find the intersection of two arrays

View Solution


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad