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
20 questions
CodeHS - Intro to Python - Basics and Console Interaction

Quiz
•
9th Grade - Professio...
20 questions
PEMROGRAMAN DASAR PYTHON

Quiz
•
11th Grade
20 questions
Python Basics ;)

Quiz
•
11th Grade
18 questions
Python basics

Quiz
•
7th - 10th Grade
20 questions
quiz dasar python

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

Quiz
•
9th - 12th Grade
22 questions
Strings in python -1

Quiz
•
11th Grade
15 questions
End of term assessment

Quiz
•
9th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade