%Mod (the remainder after dividing)
**Exponentiation (note that
^does not do this operation, as you might have seen in other languages)
//Divides and rounds down to the nearest integer
The usual order of mathematical operations holds in Python, which you can review in this Math Forum page if needed.
Bitwise operators are special operators in Python that you can learn more about here if you’d like
Arithmetic Operators: Practice Questions
Quiz: Average Electricity Bill
It’s time to try a calculation in Python!
My electricity bills for the last three months have been $23, $32 and $64. What is the average monthly electricity bill over the three month period?
In this quiz you’re going to do some calculations for a tiler. Two parts of a floor need tiling. One part is 9 tiles wide by 7 tiles long, the other is 5 tiles wide by 7 tiles long. Tiles come in packages of 6.
- How many tiles are needed?
- You buy 17 packages of tiles containing 6 tiles each. How many tiles will be left over?