Chapter 14 - Summary¶
Chapter 14 included the following concepts from computing.
Function - A function is a named set of instructions that returns a result. An example is the
abs(num)
which returns the absolute value of the num.Library - A library is a named group of related procedures and functions. An example is the Turtle library.
Procedure - A procedure is a named set of instructions that does not return a result, but can cause something to happen like the turtle
forward(amount)
procedure.Random number generator - A random number generator will return a random number.
Summary of Python Keywords and Functions¶
Modulo - The modulo, or remainder operator,
%
, returns the remainder after you divide one value by another. For example the remainder of3 % 2
is 1 since 2 goes into 3 one time with a remainder of 1.Randrange - The
randrange
function is used to return a random number. It is part of therandom
library.
Note
This is the end of chapter 14. We would love it if you could give us some feedback on this chapter at https://www.surveymonkey.com/r/ch14-teacher-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.