NEW
Font size
WorksheetsFoundations of Programming End of Course Exam
Total questions: 21
Worksheet time: 10mins
Which arithmetic operator is used in the sum 5 * 5 = 25?
Plus
Minus
Multiply
Modulus
Which of the following would you use to find the remainder in a sum?
=
%
>
//
Which of the following is the assignment operator that is used to assign a value to a variable or constant?
==
<
=
If X = 6 and Y = 3
C = X + Y
What is C?
9
8
7
Which one of these best describes a constant?
A value that does not change whilst the code is running.
A value that changes.
A location in memory to store / a value that may change
A value that cannot change
Which one of these best describes a variable?
A value that does not change whilst the code is running.
A value that changes.
A location in memory to store a value that may change
A value that cannot change
Which of the following would you use to find a divided value without a remainder?
=
%
>
//
a = 26 mod 5
What is the value of a?
1
2
5
10
a = 165 mod 16
What is the value of a?
10
5
1
16
a = 165 div 16
What is the value of a?
10
5
1
16
(5 % 2) > (10 // 2)
True
False
"4" + "26" =
30
22
426
"426"
4 + 26 =
30
22
426
"426"
What data type would hold the value 64?
Integer
Boolean
String
Float
Character
What data type holds a decimal value?
Integer
Boolean
String
Float / Real
Character
