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
Python Basics Quiz

Quiz
•
9th - 12th Grade
16 questions
Kisi Kisi Asesment Formatif Pemrograman Terstruktur

Quiz
•
10th Grade
17 questions
Python Conditionals

Quiz
•
9th - 11th Grade
20 questions
Grade 7 Python Programming Quiz

Quiz
•
7th Grade - University
16 questions
Python basics

Quiz
•
9th - 12th Grade
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
20 questions
Control Statements in Python

Quiz
•
11th Grade
12 questions
Python Print Statement

Quiz
•
6th - 10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

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

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade