
NumPy Syntax Quiz
Quiz
•
Computers
•
University
•
Medium
Emily Anne
Used 2+ times
FREE Resource
Enhance your content
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a correct syntax to create a NumPy array?
np.createArray([1,2,3,4,5])
np.array([1,2,3,4,5])
np.object([1,2,3,4,5])
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following arrays is a two-dimensional (2-D) array?
42
[1,2,3,4,5]
[[1,2,3],[4,5,6]]
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a correct syntax to check the number of dimensions in an array?
arr.dim
arr.ndim
arr.dim()
arr.ndim()
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a correct syntax to print the first item of an array?
print(myArr,1)
print(myArr[0])
print(myArr[1])
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a correct syntax to print the number 8 from the array below: arr=np.array([[1,2,3,4,5],[6,7,8,9,10]])
print(arr[3,0])
print(arr[7,2])
print(arr[1,2])
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a correct syntax to print the numbers [3,4,5] from the array below: arr=np.array([1,2,3,4,5,6,7])
print(arr[2:4])
print(arr[3:6])
print(arr[2:5])
print(arr[2:6])
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which syntax would print the last 4 numbers from the array below: arr=np.array([1,2,3,4,5,6,7])
print(arr[:4])
print(arr[3:])
print(arr[4])
print(arr[4:])
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
25 questions
C PROGRAMMING
Quiz
•
University
20 questions
Web Development and Programming
Quiz
•
University
20 questions
data structures1
Quiz
•
University
20 questions
Quantitative Aptitude Series
Quiz
•
University
20 questions
Analisis Data dengan Excel dan Google Colab
Quiz
•
10th Grade - University
20 questions
Ms word Quiz
Quiz
•
University
20 questions
Basic Python
Quiz
•
University
20 questions
quiz dasar python
Quiz
•
1st Grade - University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University