Python makes math very easy to do.
When to use
Any time you need to do math in Python, use these math operators.
Math operators in Python are pretty straight forward:
- + Add
- - Subtract
- * Multiply
- / Divide
- ** Exponents
- % Modulus
Pay attention to the order of operations.
Multiplication and division get executed before addition and subtraction; but anything inside parenthesis get's executed first.
Hints & tips
- Math operators in Python work exactly as you think they should
- Remember your math order of operations!
- You can do math on numbers or on variables too
Lesson notes are only available for subscribers.