Font size
Worksheets8525 GCSE CS 3.2.3 - 3.2.5 Operations
Total questions: 60
Worksheet time: 33mins
What is + ?
What is a - ?
Multiplication
What is a * ?
What is a / ?
What is a % ?
Less than or equal to
What is the value of the expression 100 / 25?
4
4.0
"4.0"
'4.0'
What is the output of the following code :
print 9//2
4.5
4.0
4
3
What is the answer of this expression, 22 % 3 is?
7
1
0
5
x = 4.5
y = 2
print(x//y)
2.0
2
9
9.0
x = 5
print(x > 3 and x < 10)
True
False
x = 10
print(x > 3 and x < 9)
True
False
x = 8
print(x > 3 or x < 20)
True
False
x = 14
print(x > 10 or x < 3)
True
False
x = 5
print(x < 2 or x < 3)
True
False
x = 5
print(not(x > 3 and x < 10))
True
False
x = 5
print(not(x > 3 or x < 2))
True
False
x = 5
print(not(x > 6 or x < 3 ))
True
False
x = 5
y = 3
print(x == y)
True
False
x = "5"
y = 5
print(x == y)
True
False
x = 5
y = 3
print(x != y)
True
False
x = 10
y = 10
print(x != y)
True
False
x = 5
x%=3
print(x)
2
2.0
3
3.0
What does this relational operator mean?
a != b
equal to
not equal to
less than or equal to
greater than or equal to
What does this relational operator mean?
a < b
equal to
not
less than
greater than
What does this relational operator mean?
a <= b
less than
greater than
less than or equal to
greater than or equal to
What does this relational operator mean?
a > b
less than
greater than
not equal to
equal to
What does this relational operator mean?
a >= b
less
greater than
less than or equal to
greater than or equal to
What does this relational operator mean?
a == b
equal to
not equal to
less than or equal to
greater than or equal to
40 > 41
TRUE
FALSE
2 > 3
TRUE
FALSE
The _____________ operator checks if the value of left operand is greater than the value of right operand.
= =
<
>
=
How many values does a Boolean variable have?
4
3
2
1
Infinite
What will the result of this code be?
var = True and False
print(var)
True
False
var
none of these
Which of these are boolean operators, implemented in the computer as logic gates?
Check all that apply
NOT
MOD
OR
AND
DIV
X = 100
Y = 50
print(x and y)
What is the ouput of this code?
True
100
False
50
What is the output of the following Python code?
x = 10
y = 50
if (x ** 2 > 100 and y < 100):
print(x, y)
100 500
10 50
1 5
none
