
Python NumPy Quiz

Quiz
•
Computers
•
12th Grade
•
Hard

Estebelle Khong
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a Module in Python?
To create loops
To define functions and classes
To manipulate arrays
To sort arrays
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the np.array() function do?
Creates a new array filled with zero values.
Creates a new array from an existing data structure like a list or tuple.
Generates a range of numbers spaced evenly between specified start, stop, and step values.
Randomly initializes an array of given shape and data type.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the np.arange(3, 15, 3) function call return?
An array with elements [3, 6, 9, 12, 15]
An array with elements [3, 6, 9, 12]
An array with elements [3, 5, 7, 9, 11, 13]
An array with elements [2, 5, 8, 11, 14]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will create a 2D array using np.array()?
np.array(5, 5)
np.array([1, 2], [3,4])
np.array([[1, 2], [3, 4]])
np.array() with no arguments
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following operation do? numpy.array([1, 2, 3]) + 4
It raises an error because of a mismatch in dimensions
It creates a new array with each element incremented by 4, resulting in [5, 6, 7]
IIt appends 4 to the array, resulting in [1, 2, 3, 4]
None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you change a flat array with 12 elements into a 3 rows and 4 columns matrix?
array.reshape(3, 4)
array.reshape([3, 4])
array.reshape(3, 4, 1)
array.reshape(4, 3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to reshape a 4x4 matrix into a new array with 8 columns. What should pass to .reshape() to let NumPy automatically calculate the appropriate number of rows?
.reshape(:, 8)
.reshape(-1, 8)
.reshape(0, 8)
.reshape(, 8)
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
RL NumPy Quiz 1

Quiz
•
9th - 12th Grade
12 questions
Data visualization

Quiz
•
10th Grade - University
12 questions
Javascript Arrays

Quiz
•
9th - 12th Grade
14 questions
Arrays, lists, tuples, stacks and queues

Quiz
•
11th - 12th Grade
15 questions
Area and Arrays

Quiz
•
10th - 12th Grade
11 questions
JS Certification

Quiz
•
12th Grade
15 questions
2D Lists and Arrays

Quiz
•
10th - 12th Grade
10 questions
Pemrograman Dasar

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade