30 September 2024

Lecture Code

This code is provided to accompany the lecture. It is not intended to be self-explanatory.

Booleans & Conditionals

More Conditionals

Conditional “Rules”

  • Must start with an if
    • Can only have one if
  • Can have 0 or more elif
  • Can have 0 or 1 else
    • else must be last

I Thought You Said We Could Only Have One if

Nested Indentation

Function Definitions

Return Values

Return Behavior

Multiple Arguments

Arguments

Combining Conditionals

Combining Conditionals - Example