Vocab
Booleans
Relational Operators
Conditional Statements
100

A set of commands which can be run by calling it by name.

Function

100

Keyword used to join test conditions in if statements.

Boolean

100

The symbols used to compare values in true/false tests.

Relational Operators

100

Command that tests a true/false condition.

If statement

200

Information sent to a function.

Parameter

200

Tests if both conditions are true.

And

200

day = input("What day of the week is it?")

if we do new lessons on mondays and wednesdays, what is the condition that will check if an input variable given for the day of the week is a new lesson day?

day == monday or day == wednesday

200

Used to let the program choose between two true/false options, happens when the if statement is false.

Else

300

A precise set of rules for how to solve a problem.

Algorithm

300

Takes the opposite.

Not

300

An academic grade is usually from 0% to 100%

What condition will test if a percent score is a valid academic grade?

grade >= 0 and grade <= 100

300

Tests a second (or third, or fourth...) condition in an if statement.

elif

400

If the user enters AnAcOnDa as the input variable, word, is the condition met:

word.upper() == "ANACONDA"

yes

400

Tests if at least one condition is true.

Or

400

What condition checks that num1 and num2 are not the same value?

num1 != num2

400

Putting one if statement inside another.

Nested ifs

500

The set of rules that guide what is correct code for the compiler to run.

Syntax

500

How did Booleans get their name?

The mathematician they were named after's last name is Boole

500

What condition could be written to check if a number is from 10 to 20, inclusive?


remember:
<   >   <=   >=   ==   != 

num >= 10 and num <= 20

500

condition to test if a case-insensitive word is hello

word.lower() == "hello"

M
e
n
u