Skip to content

Question 1

Evaluate:

10 // 8 + 6 * 4 - 2
Solution

Follow the rules of BODMAS/PEMDAS - carry out the multiplication and division operations first, followed by addition and subtraction. This operator // means an integer division, so 10 // 8 = 1 and not 1.25. Since the rest of the operations involve integer values only, expect the answer to be presented as type int and not float.

Answer
23  # not `23.0`