unlimited length
all private members must have leading and trailing underscores
Preferred Installer Program
None of the above
create()
list()
tuple()
array()
size
dtype
ndim
shape
range()
space()
arange()
linspace()
What will be the output?
import numpy as np a = np.array([[1,2],[3,4]]) print(a.shape)
(4,)
(2,2)
(2,1)
4
How many values are generated?
import numpy as np print(np.linspace(0, 10, 6))
5
10
6
11
import numpy as np a = np.array([1,2,3]) b = np.array([4,5,6]) print(a+b)
[5 7 9]
[1 2 3 4 5 6]
21
Error
import numpy as npa a=np.array([1,2,3]) print(a*2)
[2 4 6]
[1 2 3 1 2 3]
[3 4 5]
from package import all
from package import *
from package include all
from package include*
Testing
Delivery
Idea
Development
f.seek(-10, 0)
f.seek(10, 0)
f.seek(-10,1)
none of the above
What is the output of the following code snippet?
print([i.lower() for i in "HELLO"])
hello
['h', 'e', 'l', 'l', 'o']
hel
HELLO
Variable
File
Both of the above
Batter Programming
Optimized Coding
Systematic testing
All of the above
_val
val
try
_try_
write
writelineas
dump
pickle
What will following code segment print
if True or True: if False and True or False: print('A') elif False and False or True and True: print('B') else: print('C') else: print('D')
A
B
C
D