Booleans and Flow Control

Booleans

  1. Define Boolean.

  2. Use Booleans in Python for standard and logical arithmetic.

Logical Operators

  1. State the three basic logical operators in Python and relate them to logical operations in classical logic.

  2. Construct truth tables from complex logical expressions.

  3. Relate logical operations to set operations, and use logical operations to verify set-theoretic results.

Comparison Operators

  1. State the five basic comparison operators in Python.

  2. Use comparison and logical operators to construct conditional statements.

  3. Explain why checking for equality with floating point numbers can be problematic, and state an alternative design principle.

if and if-else Statements

  1. State the syntax for an if-else statement in Python.

  2. Convert from an if-else statement to a flowchart element and vice versa.

  3. Explain what the % operator does when acting on two integers.

  4. Use if and if-else statements to write a program with one or more conditional elements.

More Complicated Conditional Statements

  1. State the syntax for an if-elif-else statement in Python.

  2. Convert from an if-elif-else statement to flowchart elements and vice versa.

  3. Use if-elif-else statements to write a program with one or more conditional elements.

  4. Use nested conditional statements to write a program with one or more conditional elements.