What does the modulus operator (%) in Python do?
Python Modulus & Exponent & If 305

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Mr Minyard
Used 4+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Divides two numbers and returns the quotient
Divides two numbers and returns the remainder
Multiplies two numbers
Subtracts one number from another
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
(Python) If `x = 5` and `y = 2`, what is the result of `x % y`?
2.5
2
1
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the exponent operator (**) in Python do?
Raises the first number to the power of the second number
Multiplies the first number by the second number
Divides the first number by the second number
Adds the first number to the second number
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If `x = 3` and `y = 4`, what is the result of `x ** y`?
12
81
64
7
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct basic if statement in Python?
if x = 5:
if x == 5
if x == 5:
if x = 5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following Python code output?
x = 10
if x > 5:
print("Greater")
else:
print("Smaller")
Smaller
Greater
Error
Nothing
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, how do you assign an integer value of 20 to a variable named `age`?
age == 20
age = 20
int age = 20
age := 20
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Procedures and Functions

Quiz
•
10th Grade
20 questions
quiz dasar python

Quiz
•
1st Grade - University
20 questions
Python variables and operators quiz

Quiz
•
9th - 12th Grade
15 questions
Selection in Python

Quiz
•
1st - 9th Grade
18 questions
Foundations of Programming

Quiz
•
9th - 10th Grade
20 questions
Basics Python

Quiz
•
8th - 10th Grade
18 questions
Python basics

Quiz
•
7th - 10th Grade
20 questions
Python Basics ;)

Quiz
•
11th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade