Python Boolean and If

Python Boolean and If

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

ROSEMARIE KATIPUNAN

Used 61+ times

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variable that can only have two values, True or False.

Boolean
If
elif
else

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which is the correct syntax?

has_dog = true
has_dog = True
has_dog = Treu
HAS_DOG = tRue

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is syntax?

It's a string
It's an exercise
It's a structure
It's a method

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The choices of an if statement are called:

twigs
branches
leaves
trees

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

An if statement must evaluate to:

Right or Wrong
True
True or False
False

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

This operator means that one value is the same as the other value

==
!=
>
<

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This operator means that one value is not equal to another value

==
<=
>=
!=

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The result of this program:
Friday = False
if Friday:

    print "Jeans day!"
else:
    print "Dress code"

Jeans Day
Jeans day
Dress code
Dress Code

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the code:
team = Cowboys
if team = Cowboys:
    print "Dallas is #1"

Error
Cowboys
Team
Dallas is #1