[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
What value does the following expression evaluate to ?
print(5 + 8 * ((3*5)-9)/10)
9.0
9.8
10
10.0
What will be the output of the following ?
import numpy as np print(np.maximum([2, 3, 4], [1, 5, 2]))
[1 5 2]
[1 5 4]
[2 3 4]
[2 5 4]
What will be the output of the following expression?
a = 2 b = 8 print(a|b ) print(a >> 1)
10 0
10 2
2 2
10 1
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
What will be the output of the following?
import sys sys.stdout.write('welcome\n') sys.stdout.write('all\n')
Welcome<br/> All
Welcome All
Compilation Error
Runtime Error
Micro
Union
Macro
Stack
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