Professional Documents
Culture Documents
✘ 1. Which of the following is correct way to import the Numpy module in your program ?
Points: list(array) ✓
0/1 list.array
array.list ✘
None of the above
Points: d = {}
0/1 d = {“john”:40, “peter”:45} ✘
d = {40:”john”, 45:”peter”}
All of the mentioned ✓
Key Error ✘
1✓
{(2,3):2}
{(1,2):1}
✓ 5. Which of the following command can be used to find square of the elements in the 2nd row? Consider array >>> a = array([[0, 0,
0], [3, 4, 5], [0, 0, 0]]) Output should be >>> array([ 9, 16, 25])
Points:
1/1 a[-1] * a[-1]
a[1] * a[1] ✓
a[1:] * a[1:]
a[0] * a[0]
✘ 6. Which of the following is correct way to import the Numpy module in your program ?
Points: 25
1/1 [2, 33, 222, 14]
Error
[25, 14, 222, 33, 2] ✓
[“john”, “peter”]. ✓
[“john”:40, “peter”:45].
(“john”, “peter”)
(“john”:40, “peter”:45)
✘ 9. which of the following is/are correct to get last element of array? Consider array >>> a = array([2, 4, 6, 8, 10])
Points: a[-1] ✓
0/1 a[5] ✘
a[3]
a[4] ✓
Points: array.reshape(shape)
1/1 reshape(shape,array)
reshape(array,shape) ✓
reshape(shape)