wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Fun with Numpy

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

Each location of an element in an array is called ______________

a)

Size

b)

Length

c)

Index

d)

Element

2.

Two dimensional arrays are also known as ______________

a)

Subscripts

b)

Matrices

c)

ndarray

d)

Vectors

3.

One dimensional arrays are also known as _____________

a)

Vectors

b)

ndarray

c)

Matrices

d)

Subscript

4.

Which one of these is given as the 1st subscript?

a)

column index no.

b)

row index no.

5.

_________________ returns the length of each element of array in bytes.

a)

len()

b)

itemsize

c)

shape

d)

type

6.

A=np.array([1,2,3,4],dtype=np.float64)

What is the itemsize of array 'A'?

a)

1

b)

4

c)

8

d)

16

7.

b=np.array([[1,2,3,4],[5,6,7,8],[10,11,12,13]])

Write the value of b[2,1].

a)

3

b)

6

c)

10

d)

11

8.

We can do arithmetic operations in python list.

a)

True

b)

False

9.

x=np.array([9,4,2,7])

y=x+5

a)

[14 9 7 12]

b)

[14,9 ,7, 12]

c)

[13 8 6 12]

d)

[13,8 ,6 ,12]

10.

_______________ is used to change the dimension or shape of the array.(Select the code used for it.)

a)

shape

b)

reshape

c)

reshape()

d)

itemsize