Search Header Logo

Python Control Structures (Unit 4 AP CSP)

Authored by atty meyer

Computers

10th Grade

Used 56+ times

Python Control Structures (Unit 4 AP CSP)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

After the following code runs, what is the value of is_weekend?

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What symbol represents the and operator in Python?

AND

and

&

&&

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What symbol represents the or operator in Python?

OR

or

I

I I

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the proper way to compare if two values are equal in a boolean expression in Python?

==

=

EQUALS

is

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the proper operator for “not equals” in Python?

=~

NOT EQUALS

=!

!=

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Assume you are writing a program, and you have a boolean variable called b, defined like so:

b = True

Pick the correct if statement to follow the code above. The if statement should be correct Python, and the body of the if statement should only run if b is True.

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following programs will not print anything?

Media Image
Media Image
Media Image
Media Image

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?