
test01

Quiz
•
Computers
•
Professional Development
•
Medium
+7
Standards-aligned
hubert Lu
Used 7+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Intro to Python I Quiz

Quiz
•
Professional Development
11 questions
Introdução à programação com Python

Quiz
•
Professional Development
15 questions
Interrupt-13

Quiz
•
Professional Development
10 questions
Python Quiz

Quiz
•
Professional Development
15 questions
Computación básica - Conceptos básicos

Quiz
•
Professional Development
15 questions
Python to Access Data Quiz

Quiz
•
Professional Development
9 questions
python - ML1

Quiz
•
Professional Development
10 questions
IT ENGLISH: Research Project Topics - Python Programming Languag

Quiz
•
Professional Development
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
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development