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
What does the modulus operator (%) in Python do?
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 Wayground
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
20 questions
Python year 9

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

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

Quiz
•
11th Grade
20 questions
quiz dasar python

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

Quiz
•
9th - 12th Grade
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
20 questions
Basics Python

Quiz
•
8th - 10th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade