Python course · Chapter 3

Numbers and maths

Operators, // and %, order of operations, rounding.

Project: a pizza splitter.

  1. 3.1The operatorsAdd, take away, multiply, divide and raise to a power, and when the answer is a whole number or a decimal.7 steps · about 20 minutes · 0 of 3 challenges passedStart →
  2. 3.2Whole-number divisionHow many whole times does it fit, and what's left over? // and % answer both questions.7 steps · about 20 minutes · 0 of 3 challenges passedOpen →
  3. 3.3Order of operationsPython does multiplication before addition, just like in maths, and brackets let you decide the order.7 steps · about 25 minutes · 0 of 3 challenges passedOpen →
  4. 3.4Rounding and tidyinground(), int() and abs(): turn long decimals into tidy answers.8 steps · about 25 minutes · 0 of 3 challenges passedOpen →
  5. 3.5Project: pizza splitterPut the chapter together: share pizzas fairly, count the left-over slices and work out the cost.4 steps · about 15 minutes · 0 of 2 challenges passedOpen →
  6. CheckCheckpointFive mixed questions on numbers and maths, with Chapters 1 and 2 mixed back in. Pass them all to finish the chapter.1 steps · about 15 minutes · 0 of 5 challenges passedOpen →