📚 › Python: the friendliest first language
4. Numbers and operators
Python uses + - * / for arithmetic. // is floor division, giving a whole number. % gives the remainder. ** is the power operator, so 2 ** 3 is 8.
Use parentheses to choose the order of calculation.
Show example
print(7 // 2)
print(7 % 2)
print(2 ** 3)
✍️ Your turn
Print 2 raised to the power of 10.