
test01
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
+7
Standards-aligned
hubert Lu
Used 7+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
import numpy as np
x = np.array([[1, 2], [3, 4]])
y = np.array([[5, 6], [7, 8]])
z = np.dot(x, y)
print(z)
a) [[19, 22], [43, 50]]
b) [[5, 6], [7, 8], [1, 2], [3, 4]]
c) [[6, 8], [10, 12]]
d) [[1, 2], [3, 4], [5, 6], [7, 8]]
Tags
1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
import numpy as np
x = np.array([[1, 2], [3, 4]])
y = np.array([5, 6])
z = x * y
print(z)
a) [[5, 12], [15, 24]]
b) [[5, 6], [5, 6]]
c) [[1, 2, 5, 6], [3, 4, 5, 6]]
d) ValueError: operands could not be broadcast together with shapes (2,2) (2,)
Tags
2
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
x = 5
if x > 3:
print("x is greater than 3")
else:
print("x is less than or equal to 3")
a) x is greater than 3
b) x is less than or equal to 3
c) x is equal to 3
d) None of the above
Tags
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the data type of the value 5 in Python?
float
string
list
Tags
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid string declaration in Python?
string("Hello")
str = Hello
str('Hello')
string = 'Hello'
Tags
5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you get the length of a string s in Python?
len(s)
s.len()
length(s)
s.length()
Tags
6
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to convert a string to an integer in Python?
int()
str()
convert()
toInt()
Tags
7
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
10 questions
Avaliação Pensamento Computacional - Prático
Quiz
•
1st Grade - Professio...
11 questions
Sains Komputer Tingkatan 4 - 1.7.1 Menghuraikan setiap fasa
Quiz
•
1st Grade - Professio...
10 questions
GUESS THAT WORD IN CYBER!
Quiz
•
Professional Development
15 questions
Python Class 1
Quiz
•
Professional Development
10 questions
c programming-Test 1
Quiz
•
Professional Development
10 questions
PHP QUIZ-2
Quiz
•
Professional Development
10 questions
CodeMonkey Platform Management & Resources
Quiz
•
Professional Development
10 questions
Revisão LP 2023.1
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development
