Python Modulus & Exponent & If 305

Python Modulus & Exponent & If 305

9th - 12th Grade

17 Qs

quiz-placeholder

Similar activities

Python_2R

Python_2R

KG - Professional Development

20 Qs

Python Basics Review

Python Basics Review

10th Grade

18 Qs

Python Conditionals Practice

Python Conditionals Practice

9th - 12th Grade

20 Qs

Computer Science (Python)

Computer Science (Python)

9th Grade

18 Qs

Basics Python

Basics Python

8th - 10th Grade

20 Qs

Python Syntax

Python Syntax

10th Grade

16 Qs

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

Python

Python

6th - 10th Grade

17 Qs

Python Modulus & Exponent & If 305

Python Modulus & Exponent & If 305

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

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

Media Image

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?