Numpy Quiz 1

Numpy Quiz 1

University

12 Qs

quiz-placeholder

Similar activities

DS_NumPy_TEST1

DS_NumPy_TEST1

University

12 Qs

InCube #Quiz 2

InCube #Quiz 2

University

15 Qs

Reshaping & vStack&hstack( )

Reshaping & vStack&hstack( )

9th Grade - University

10 Qs

PYTHON-QUIZ-2023

PYTHON-QUIZ-2023

University

17 Qs

Quiz 12

Quiz 12

University

10 Qs

workshop FSTM

workshop FSTM

University

13 Qs

Python_numpy

Python_numpy

University

8 Qs

C++ Array Quick Review

C++ Array Quick Review

University

10 Qs

Numpy Quiz 1

Numpy Quiz 1

Assessment

Quiz

Computers

University

Medium

Created by

Vishnuvardhan Reddy Avija

Used 6+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to create an array in NumPy?

numpy.createArray()

numpy.makeArray()

numpy.newArray()

numpy.array()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to reshape a NumPy array?

transform

resize

reshape

adjust

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you concatenate two NumPy arrays?

Use numpy.concatenate((array1, array2), axis=0) to concatenate two NumPy arrays.

Use numpy.add(array1, array2) to concatenate two NumPy arrays.

Combine arrays with array1 + array2 for concatenation.

Use numpy.stack((array1, array2), axis=1) to concatenate two NumPy arrays.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of np.arange(5)?

[0, 1, 2, 3, 4]

[0, 1, 2, 3, 4, 5]

[0, 1, 2, 3]

[1, 2, 3, 4, 5]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function computes the mean of a NumPy array?

numpy.average

numpy.sum

numpy.mean

numpy.median

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the np.zeros() function return?

A list of empty strings.

An array filled with ones.

An array filled with zeros.

A matrix of random numbers.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change the data type of a NumPy array?

Use the `astype()` method to change the data type of a NumPy array.

Change the data type by reassigning the array to a new variable.

Use the `convert()` function to change the data type.

Use the `change_type()` method to modify the data type.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?