Knowledge organisersArithmetic Operators
Use powers in code.
The ** operator raises a number to a power. It is Python's equivalent of the mathematical exponent notation.
** means 'to the power of': 2 ** 3 → 8n ** 2n ** 0.5* and / in precedenceprint(2 ** 3) # 8
print(5 ** 2) # 25
print(9 ** 0.5) # 3.0 (square root)