Search Header Logo

Python Programming Worksheet

Authored by Khoa Nguyen Hoang Dang

Computers

2nd Grade

Used 2+ times

Python Programming Worksheet
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is the "or" operator used in a "if" statement?

It checks if both conditions are true

It checks if either of two conditions is true

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

When the program is run, what will happen?

5.5

a//b

2

5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be displayed when you run the program?

20

1.25

Syntax error

9

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is the "and" operator used in a "if" statement?

It checks if either of two conditions is true

It checks if both conditions are true

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do we change variable x from float to integer?

By using the int() function

By using the float() function

By using the str() function

By using the bool() function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Python "if" statement's purpose?

to display data on screen

to get user input

To decide what to do and run code conditionally

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement checks if a number is even?

if number mod 2 == 0:

if number % 2 == 0:

if number // 2 == 0:

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?