Knowledge organisersArithmetic Operators
Apply BIDMAS to expressions.
Python follows BIDMAS (Brackets, Indices, Division/Multiplication, Addition/Subtraction). Operations like **, *, /, +, - are evaluated in that order, just like in maths.
() are evaluated first** (indices/powers)* / // % (left to right)+ - (left to right)print(2 + 3 * 4) # 14, not 20
print((2 + 3) * 4) # 20
print(10 - 2 ** 3) # 2 (10 - 8)