# 08 - Operators Simple Calculations

1. In the following code the '+' operator is used for:
```x=1
y=2
z=x+y
print(z)```

division

subtraction

multiplication

2. Which of the following is NOT an operator
```Operators
==========
+
-
/
*
print
exponential
DIV
MOD
var```

var, DIV

DIV, MOD

print, var

The only one on the list that is not an operator is MOD

3. DIV is the operator that gives you the remainder that is left over when a number is divided by another

TRUE

FALSE

4. Integer division (DIV) can be thought of as the number of times a number can be subtracted by another e.g.
`Note: this is written as // in Python`

10 DIV 3 = 7

10 DIV 3 = 13

10 DIV 3 = 3

10 DIV 3 = 0

5. The key thing about DIV is that it is integer division and it has the effect of …

None of the above

rounding down to the nearest integer

dividing the decimal points by the integers

6. 10 MOD 3 =

2

1

3

4

7. 7 DIV 3 =

1

3

4

2

8. Look at the following python code and predict the output
```x=3
print(x/2)```

1

1.5

2.5

2

9. The following code using DIV (//) rather than / would give an output of:
```x=3
print(x//2)```

2.5

1.5

2

1

10. 5 MOD 5 =

2

1

0

3

11. 10 MOD 2 =

1

2

3

0

12. 5 MOD 2

0

2

1

3

13. 5 DIV 2
`5 // 2 = `

1.5

2.5

1

2

14. BIDMAS/BODMAS applies when you are working with formulas. What would you deal with first?
`(x+y) - (x*y)`

what's inside the brackets

the multiplication

the subtraction