wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

cp1Gr9Adv

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use advanced mathematical and scientific calculations in his program. Ali should add the ___________ library to his program.

a)

Sum

b)

NumPy

c)

Array

d)

Reshape

2.

In NumPy, the ________ function is used to change the rows to columns, and the columns to rows.

a)

array

b)

stack

c)

transpose

d)

reshape

3.

In Python, the data structure that stores elements of the same data type is called an array.

a)

True

b)

False

4.

Meera has created a small program in Python. She wants to store elements of the same data type in an organized data structure using the NumPy library. To do this Meera should use the NumPy __________ function.

a)

array

b)

transpose

c)

reshape

d)

dataframe

5.

The line of code to the right will import the NumPy library. The "np" is an assigned name for the library.

a)

True

b)

False

6.

What would be the printed output of the Python code to the right?

a)

np_Hamad

b)

['Hamad' '16' '60']

c)

['Hamad']

d)

['16' '60']

7.

The line of the code to the right, will create an array that carries values from 0 to 10 with step size 2.

a)

True

b)

False

8.

In the NumPy function, the data preparation technique that is used to help machine learning algorithms is called _________.

a)

reprint

b)

reshaping

c)

reimport

d)

rearrange

9.

In NumPy, to append two arrays vertically the function __________ is used.

a)

sum()

b)

vstack()

c)

hstack()

d)

array()

10.

The line of the code to the right, will create a NumPy array from a list.

a)

True

b)

False