October 2019
Beginner to intermediate
498 pages
14h 13m
English
This chapter introduced the following building blocks of programming and Python:
▶ Math methods.
▶ Random numbers.
▶ Boolean expressions using relational and logical operators.
▶ Selection statements using if, if-else, and if-elif-else.
▶ The accumulator pattern, which uses an accumulator variable that is continuously updated as part of an iteration. It is important to initialize the accumulator variable to an appropriate starting value.
accumulator pattern
accumulator variable
Archimedes approach
Boolean expression
compound Boolean expression
if statement
initialization
Leibniz formula
logical operator
Monte Carlo simulation
nested selection
pi
relational expression
relational operator
running sum
Read now
Unlock full access