11.8. Chapter Summary

This chapter included the following concepts from computing.

11.8.1. Summary of Python Keywords and Functions

  • Else - The keyword else is used to execute one or more statements in a block following the else when the condition in the if part of the statement is false. An else must always have an if statement before it.

  • Elif - The keyword elif is used when you want to have a conditional with 3 or more possibile options. Add as many elif statements as you need after an if and before a else.

  • If - The Python keyword if is used to start a condition. It is followed by a Boolean expression and then has one or more statements in the body of the loop that are executed only if the Boolean expression is true.

You have attempted 1 of 1 activities on this page