
NumPy Syntax Quiz
Authored by Emily Anne
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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:])
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
20 questions
DWII - Avaliação Número 1
Quiz
•
University
20 questions
Quiz 2 PBO
Quiz
•
University
20 questions
Diagnóstico de Programación 1
Quiz
•
University
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
20 questions
Basic 2 Python
Quiz
•
12th Grade - Professi...
20 questions
QUIZ AZIK
Quiz
•
University
20 questions
MS Word Control A-Z Quiz
Quiz
•
5th Grade - University
20 questions
Teknologi Informasi dan Komunikasi
Quiz
•
8th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade