Terminal
Process
Input/Output
Decision
What is the output of the following code ?
def disp(*arg): for i in arg: print(i) disp(name="Rajat", age="20")
TypeError
Rajat 20
Name age
None of these
What is the output of the following code?
x = 50 def func (x): x = 2 func (x) print ('x is now', x)
x is now 50
x is now 2
x is now 100
Error
Compiler
Interpreter
Executer
Translator
Micro
Union
Macro
Stack
What will be the output of the following ?
import numpy as np a = np.array([1, 5, 4, 7, 8]) a = a + 1 print(a[1])
4
5
6
7
import numpy as np a = np.arange(1,5,2) print(a)
[1 3 5]
[1 3]
[1,3]
[1,2,3,4,5]
import numpy as np a = np.arange(5,1) print(a)
[ ]
[1 2 3 4 5]
[5 4 3 2 1]
[1 2 3 4]
import numpy as np a = np.arange(1,3,.5) print(a)
[1 2 3]
[1. 1.5 2. 2.5]
[1. 1.5 2. 2.5 3]
[1 1.5 2 2.5 3]
import numpy as np a=np.array([2,4]) b=np.array([3,5]) c=a*b print(c)
[ 2 4 3 5]
[ 6 20]
[ 6 12 10 20]
26
import numpy as np a=np.array([2,4,1]) b=np.array([3,5]) c=a+b print(c)
[2 4 1 3 5 ]
[5 9 1]
15
ValueError
import numpy as np a=np.array([2,4,1]) b=a a[1]=3 print(b)
[2 4 1]
[3 4 1]
[2 3 1]
[2 4 3]
import numpy as np a=np.array([2,4,1]) b=a.copy() a[1]=3 print(b)
Indexed
Sliced
Iterated
All of the mentioned above
We can find the dimension of the array
Size of array
Operational activities on Matrix
None of the mentioned above
What will be the output of following Python code?
import numpy as np a = np.array([(10,20,30)]) print(a.itemsize)
10
9
Guido van Rossum
Travis Oliphant
Wes McKinney
Jim Hugunin
Mathematical and logical operations on arrays.
Fourier transforms and routines for shape manipulation.
Operations related to linear algebra.
All of the above
ndarray
narray
nd_array
darray
np.array([4,5,6])
np.create_array([4,5,6])
np.createArray([4,5,6])
np.numpyArray([4,5,6])