Quiz8

Quiz8

Professional Development

20 Qs

quiz-placeholder

Similar activities

Anits Sample Mock Test-I

Anits Sample Mock Test-I

Professional Development

20 Qs

Season 5 #Spaic Python Weekly Quiz

Season 5 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

NumPy Quiz

NumPy Quiz

Professional Development

21 Qs

Sorting - IV year

Sorting - IV year

Professional Development

20 Qs

Final Assessment

Final Assessment

Professional Development

16 Qs

PLD_FinalsSAT Quiz

PLD_FinalsSAT Quiz

Professional Development

25 Qs

JavaScript ( review I )

JavaScript ( review I )

Professional Development

16 Qs

InCube #Quiz 6

InCube #Quiz 6

Professional Development

20 Qs

Quiz8

Quiz8

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Moirangthem Sonia

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method can reshape a flat NumPy array into a 2D multiplication table?

np.reshape()

np.flat()

np.array_split()

np.flatten()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is conditional replacement in NumPy?

Replacing all elements of an array

Replacing elements only if they meet a condition

Reshaping the array conditionally

Using np.where() to copy an array

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output?
import numpy as np

arr = np.arange(9).reshape(3,3)

arr[arr%2==0] = -1

print(arr)

All values replaced with -1

Only even values replaced with -1

Only odd values replaced with -1

Only odd values replaced with 1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String-based formatting of NumPy arrays is useful for:

Saving arrays as CSV

Printing arrays in a custom style

Converting arrays to strings permanently

Performing matrix multiplication

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Min-max scaling transforms data values into the range:

[0, ∞)

[-1, 1]

[0, 1]

Any arbitrary range

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function can be used to sort elements in a slice of a NumPy array?

np.order()

np.sort()

np.arrange()

np.reorder()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

arr = np.array([9,3,7,1,5])

print(np.sort(arr))

what will be the output?

[9 3 7 1 5]

[1 3 5 7 9]

[5 7 9 1 3]

[1,3,5,7,9]

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?