Python Modulus & Exponent & If 305

Python Modulus & Exponent & If 305

9th - 12th Grade

17 Qs

quiz-placeholder

Similar activities

Python Quiz

Python Quiz

6th - 10th Grade

20 Qs

Python U2M3 Test

Python U2M3 Test

9th - 12th Grade

16 Qs

Recuperacion final parte 1

Recuperacion final parte 1

8th Grade - University

20 Qs

Python Programming Quiz

Python Programming Quiz

10th Grade - University

20 Qs

Python Final Exam

Python Final Exam

9th Grade

21 Qs

Câu lệnh IF

Câu lệnh IF

10th - 12th Grade

15 Qs

PYTHON PROGRAMMING

PYTHON PROGRAMMING

11th - 12th Grade

15 Qs

Quiz Pemrograman Phyton

Quiz Pemrograman Phyton

9th - 12th Grade

20 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?