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
Python - lists,loops,basics

Quiz
•
9th - 11th Grade
14 questions
Python Basics - Year 8

Quiz
•
7th - 9th Grade
16 questions
Python programming

Quiz
•
6th - 12th Grade
20 questions
Python Quiz 2

Quiz
•
9th Grade
18 questions
Foundations of Programming

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

Quiz
•
8th - 10th Grade
20 questions
Procedures and Functions

Quiz
•
10th Grade
20 questions
Python Conditionals Practice

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
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
Discover more resources for Computers
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