The Four Families
You've met operators one at a time. Here's the full map, in four families:
Arithmetic, + - * / % ** //, produce numbers
Comparison, > < >= <= == !=, produce Booleans
Logical, and or not / && || !, combine Booleans
Assignment, = += -= *= /=, store values
Compound assignment is the family you haven't met. total += 5 is shorthand for total = total + 5. It's shorter, and it's the standard way to accumulate a running total.
Mark this lesson complete
Signed in, your progress follows you to every device.