DS19052023 - NumPy Quiz for the day

Q1. NumPy supports which type of arrays?

a. 1 Dimensional array
b. 2 Dimensional array
c. 3 Dimensional array
d. n Dimensional array

Q2. Identify the output of the following code
image

a. array([25, 35.75, 48, 59, 73])
b. array([25. , 35.75, 48. , 59. , 73. ])
c. array([25, 35, 48, 59, 73])
d. The above code produces error

Q3. Identify the output of the following code
image

a. array([25, 35.75, 48, 59, 73, ‘Python’], dtype=‘<U32’)
b. array([25, 35.75, 48, 59, 73, ‘Python’], dtype=‘int32’)
c. array([‘25’, ‘35.75’, ‘48’, ‘59’, ‘73’, ‘Python’], dtype=‘<U32’)
d. array([25. , 35.75, 48. , 59. , 73. , ‘Python’], dtype=‘<U32’)

Q4. Identify the output of the following code
image

a. Value Error
b. [10, 20, 30, 40, 50, 60, 70]
c. [60, 80, 100, 40]
d. Syntax Error

Q5. Which of the following function cannot be used on a NumPy array?

a. sum()
b. mean()
c. Median()
d. count()
e. mode()

3 Likes

Q1:
ans: d
Q2:
ans: b
Q3:
ans: c
Q4:
ans: a
Q5:
ans: d

1 Like

Q1. (d)
Q2. (b)
Q3. (c)
Q4. (d)
Q5. (e)

1 Like

1.) d
2.) b
3.) c
4.) d
5.) d

1 Like

1.d
2.b
3.c
4.a
5.e
Q1. NumPy supports which type of arrays?

a. 1 Dimensional array
b. 2 Dimensional array
c. 3 Dimensional array
d. n Dimensional array

Q2. Identify the output of the following code

1 Like
  1. d
  2. b
  3. c
  4. a
  5. d
1 Like

The answer is-
d
b
c
a
d

1 Like
  1. d
  2. b
  3. c
  4. a
  5. d
1 Like
  1. (d)
  2. (b)
  3. (c)
  4. (a)
  5. (e)
1 Like

1.d
2.b
3.c
4.a
5.d
these are the answers

1 Like

1-n Dimensional array
2-array([25. , 35.75, 48. , 59. , 73. ])
3-array([‘25’, ‘35.75’, ‘48’, ‘59’, ‘73’, ‘Python’], dtype=‘<U32’)
4-Value Error
5- mode()

1 Like

Numpy Quiz for the day
1.d
2=b
3.c
4.c
5.d

1 Like

1…[d]
2…[b]
3…[c]
4…[a]
5…[d]

1 Like

1.) (d)
2.) (b)
3.) (c)
4.) (a)
5.) (d)

1 Like

1.) d
2.) b
3.) c
4.) d
5.) d

1 Like
  1. d
  2. b
  3. d
  4. d
  5. d
1 Like

1 : d
2 : b
3 : c
4 : a
5 : d