Booleans/Logical Operators
Comparison Operators/If Statements
Tracy Review
Unit 3
Random
100

In a Boolean statement, are the true or false values capitalized or not?

Capitalized; True or False

100

What do comparison values let us do?

Compare two values

100

What do we start single line comments with?

#

100

Is 29 a prime number?

yes

200

What is a boolean?

A boolean is a value that can be either true or false. 

200

What does an if statement do?

Completes indented commands only if a condition is found true

200

Tracy is facing east (right). What are two ways to get her to face north?

left(90) or right(270)

200

What is the type of the variable x in the following Python program?

string

200

What is the largest city (in terms of population) in the USA?

New York

300

Like integers, Booleans have to be given to the ___ function before they can be concatenated with strings. 

str function 

300

What is non-sequential programming?

Programming that may or may not take a detour from the usual order of execution, depending on circumstances.  

300

What is a for loop?

A programming construct that allows us to execute code a predetermined number of times.

300

FREE 300 POINTS

FREE 300 POINTS

300

What is the freezing point of water in degrees Fahrenheit?

32 degrees

400

What do logical operators allow us to do?

Logical operators allow students to connect or modify Boolean expressions. Three logical operators are and, or, and not.

400

What does an else statement do?

Completes indented commands only if previous conditions are found false

400

What does each number in this for loop mean?

for i in range(1, 10, 2)

1: starting value for i

10: ending value for i

2: this is the amount to increment i each loop 

400

LOSE A TURN

LOSE A TURN

400

Who won the Super Bowl last month?

Eagles

500

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

is_saturday = True
is_sunday = False
is_weekend = is_saturday or is_sunday

True

*Remember we work with truth tables!*

500

What do these comparison operators mean?

==

!=

>

<

>=

<=

Equal to

Not equal to

Greater than

Less than

Greater than or equal to

Less than or equal to

500

FREE 500 POINTS

FREE 500 POINTS

500

Will this program run?

x = 4
y = "hi"
print(x + y)

no

500

LOSE YOUR TURN

LOSE YOUR TURN