Consider the following code:
x = 3
y = 5
z = 2
print(y ** z + z)
What is output?
Python Unit 2 Quiz 2
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Gerri McCann
Used 25+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
x = 3
y = 5
z = 2
print(y ** z + z)
What is output?
12
17
25
27
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
x = 3
y = - 4
z = 1
print( x + y * y )
2
-2
19
5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What output is produced by:
x = 19.29428347
x = x * 100
num = int(x)
print(num)
19.2943
19
1929
19.29
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line of code is necessary for random numbers to work in Python?
import random
import integer
x = randomint
x = int(input("Enter a number"))
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a Python Command?
int
str
input
dec
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output?
print(7 % 4)
0
1
2
3
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output?
print(8 % 4)
0
1
2
3
4
8 questions
Edublocks D01
Quiz
•
6th - 9th Grade
16 questions
Python programming
Quiz
•
6th - 12th Grade
13 questions
Python Iteration
Quiz
•
10th Grade
14 questions
C++ - Loops and Random Numbers
Quiz
•
9th - 12th Grade
17 questions
"switch" Java Statement - 1
Quiz
•
9th - 10th Grade
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops
Quiz
•
9th Grade - University
15 questions
computer class output upto for loop
Quiz
•
9th Grade
12 questions
Java Strings
Quiz
•
9th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University