Python - Numpy Quiz 3

Python - Numpy Quiz 3

University - Professional Development

5 Qs

quiz-placeholder

Similar activities

C++ Array Quick Review

C++ Array Quick Review

University

10 Qs

CPT027 Review Quiz 1

CPT027 Review Quiz 1

University

8 Qs

Exploring NumPy Arrays

Exploring NumPy Arrays

University

10 Qs

Arrays in C (II yr 02.07.2020)

Arrays in C (II yr 02.07.2020)

University

10 Qs

Data Wrangling 01

Data Wrangling 01

Professional Development

10 Qs

Python - Numpy Quiz 2

Python - Numpy Quiz 2

University - Professional Development

5 Qs

C Program Array and strings

C Program Array and strings

University

10 Qs

Data Analytics using Python - Quiz 1

Data Analytics using Python - Quiz 1

University

10 Qs

Python - Numpy Quiz 3

Python - Numpy Quiz 3

Assessment

Quiz

Computers

University - Professional Development

Medium

Created by

Max Diender

Used 16+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would be the answer of this cummulative summation in NumPy?


arr = np.array([1,2,3])

print(np.cumsum(arr))

[1 3 6]

[6]

[3 6 9]

[9]

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct syntax to subtract the numbers from arr1 with the numbers from arr2?

np.substract(arr1, arr2)

np.min(arr1, arr2)

np.sub(arr1, arr2)

np.minus(arr1, arr2)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct method to round decimals in NumPy?

np.around()

np.trunc()

All the other 3 are rounding methods in NumPy

np.fix()

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct method for getting the Natural Logarithm (Logarithm at base e)?


arr = np.arange(1, 10)

np.log(arr)

np.loge(arr)

np.natural(arr)

np.ln(arr)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following syntax?


arr = np.array([100, 200, 50, 75])

newarr = np.diff(arr)

print(newarr)

[100 -150 25]

[-100 150 -25]

[100 25]

-100 -25]