Python Modulus & Exponent & If 305

Python Modulus & Exponent & If 305

9th - 12th Grade

17 Qs

quiz-placeholder

Similar activities

LA1.C1: Introduction to Small Basic

LA1.C1: Introduction to Small Basic

9th Grade

15 Qs

12AIT - All About W3C <3

12AIT - All About W3C <3

10th Grade - University

18 Qs

WJEC GCSE ICT Unit 1 E-Mail

WJEC GCSE ICT Unit 1 E-Mail

9th - 10th Grade

13 Qs

PowerPoint Quiz 2

PowerPoint Quiz 2

9th Grade

13 Qs

Pointers

Pointers

12th Grade

20 Qs

10A16_L1_HK1

10A16_L1_HK1

10th Grade

15 Qs

Asas JavaScript

Asas JavaScript

1st Grade - University

18 Qs

Cyber Security KS4

Cyber Security KS4

8th - 12th Grade

15 Qs

Python Modulus & Exponent & If 305

Python Modulus & Exponent & If 305

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Mr Minyard

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?