Unit 5 · Lesson 3
Build the idea
Start with the concept and its key vocabulary.
ERL uses ^ for exponentiation; Python uses **. Expressions follow an order: brackets, powers, multiplication/division/DIV/MOD, then addition/subtraction. Multiplication/division and addition/subtraction ties work left to right; chained Python powers are the exception and group from the right. To increment safely, calculate from the old value and assign back: score = score + 1.
Raising one number to the power of another.
Rules that decide which operator in an expression is evaluated first.
Symbols used to make part of an expression evaluate before the surrounding operations.
Increasing a stored number, often by one, and saving the new value.