13.9. Chapter Summary

This chapter included the following concepts from computing.

13.9.1. Summary of Python Keywords and Functions

  • And - The keyword and is used to join two logical expressions and then both of the logical expressions must be true for the joined expression to be true.

  • 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.

  • Not - The keyword not is used to negate a logical expression. If the original expression is true the negated expression is false and if the original expression is false the negated expression is true.

  • Str - The function str turns a number into a string so that it can be appended to a string.


This is the end of chapter 13. We would love it if you could give us some feedback on this chapter at https://www.surveymonkey.com/r/ch13-student-fb. You might want to open this link in a new tab to make it easier for you to return to your place in this ebook.

You have attempted of activities on this page