WorksheetsArithmetic Operators, Casting, Concatenation
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
Concatenate the following variables into strings:
houseNumber
roadName
a)
streetAddress = houseNumber + roadName
b)
streetAddress = "houseNumber" + "roadName"
c)
streetAddress = 64 + Zoo Lane
d)
streetAddress = housenumber * roadName
2.
What does casting do?
a)
Changes a data type
b)
Magic
c)
Joins strings together
d)
Raises a number to a power
3.
What does concatenation do?
a)
Changes a data type
b)
Magic
c)
Joins strings together
d)
Raises a number to a power
4.
What is 2^2
(a)
5.
What is 4**2?
(a)
6.
What is 60 MOD 7?
a)
4
b)
8
c)
12
d)
3
7.
What is 49 DIV 8?
a)
6
b)
1
c)
12
d)
5
8.
What is 4*2+3?
a)
11
b)
9
c)
5
d)
13
9.
What is 8/2+4
a)
8
b)
20
c)
10
d)
4
10.
What arithmetic operator is missing from the following equation?
29 ? 7 = 4
a)
MOD
b)
DIV
c)
^
d)
/
100 %
