Font size
WorksheetsPython
Total questions: 29
Worksheet time: 28mins
Select the correct Operator for addition
+
=
X
$
Select the correct operator for subtraction:
*
-
_
*
Select the correct operator for multiplication:
x
*
**
+
Select the correct operator for division:
/
\
"
!
Select the correct answer:
x = 15
y = 4
print( 'x * y')
59
60
54
22
Logical operators:
True if both operands are true
x and y
x or y
not x
Logical Operators:
True if either of the operands is true
x and y
x or y
not x
Logical Operators:
true if operand is false
x and y
x or y
not x
Which python operator means 'less than or equal to'?
>=
>
<
<=
x = 10
y = 10
print(x != y)
True
False
x = 5
y = 3
print(x == y)
True
False
x = 8
print(x > 3 or x < 20)
True
False
What does the following comparison operator “==” represent in Python programming?
Equal to
Assignment
Allocation
Not equal to.
What does the following comparison operator “<” represent in Python programming?
Equal to
Greater than
Less than
Not equal to.
What does the following comparison operator “>” represent in Python programming?
Equal to
Greater than
Less than
Not equal to.
What does the following comparison operator “!=” represent in Python programming?
Equal to
Assignment
Allocation
Not equal to.
print cannot have a capital
(a)
To output hello world! which would be the correct python line of code
output("Hello World!)
Print("Hello World!)
print("hello world!)
print("hello world")
What is the variable in the code shown
variable
Name
name
Pick a syntax error in the code
Capital P for print
Missing brackets
Missing comma
Missing speech marks
What is the output of the following code if raining was entered
Take a brolly!
Have a great day
The code would not run
What is the output of the following code if Raining was entered
Take a brolly!
Have a great day
The code would not run
What is the output of the following code if sunny was entered
Take a brolly!
Have a great day
The code would not run
What would output if the answer to Q1 was london?
well done you have a point
try again
the code would not run
What would output if the answer to Q2 was barcelona?
well done you have a point
try again
the code would not run
What would the score be if the answer to Q1 was manchester and the answer to Q2 was madrid?
(a)
Name the first variable in this code
(a)
What key term in python allows the user to answer a question
(a)
If you have a syntax error will the code run?
Yes
No
