Search Header Logo

Python If Statements - and or not

Authored by Alexander Anderson

Computers

11th Grade

Used 17+ times

Python If Statements - and or not
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will execute the block of code if the variable `a` is equal to 10?

if a = 10:

if a == 10:

if a != 10:

if a > 10:

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which character must be at the end of the line for if?

:

;

.

{

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this code snippet print:

equal

equal

not equal

not equal

syntax error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this code snippet print:

Yes

indentation error

yes

10

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax to check if two values are not equal in Python?

!==

!=

==

<>

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write an if statement to check if `x` is greater than 10?

if x > 10:

if x is > 10:

if x >> 10:

if x gt 10:

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

not ( 7 == 8 )

True

False

Error

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?