In this lesson, students will revisit the concept of boolean values. Booleans refer to a value that is either true or false. Named after English-born mathematician, philosopher and logician, George Boole, Booleans are used to test whether a condition is true or false.
Students will be able to:
In this lesson, students will review how to use If and if/else statements. These statements allow programmers to use conditions to determine how their code should run.
Students will be able to:
In this lesson, students will dive into comparison operators. Comparison operators give the ability to compare two values. Using comparison operators in programming is similar to math in that less than <, greater than >, less than or equal to <=, and greater than or equal to >= are the same. The differences are that operators for equal to are == and not equal are !=. Using comparison operators allow programs to make decisions.
Students will be able to:
In this lesson, students will look at logical operators. Logical operators give the ability to connect or modify Boolean expressions. Three logical operators are NOT
(!), or
and and
. These logical operators can be used in combination. With these logical operators, logical statements can be constructed, such as “I go to sleep when I am tired OR it’s after 9pm”, “I wear flip flops when I am outside AND it is NOT raining”.
Students will be able to:
or
, and
, and NOT
(!) In this lesson, students learn about the intricacies of floating point numbers. When using comparison operators with floating point numbers in Python, we will sometimes see strange behavior because of bizarre rounding methods. When using a comparison operator with floating point numbers, you should use round(x)
to avoid strange rounding behavior. round(x, n)
will round the float x
to n
decimal places. round(x)
will round the float x
to 0 decimal places.
Students will be able to:
In this lesson, students review content with a 15 question Unit Quiz.
Students will be able to: