NEW
Font size
S
M
L
XL
WorksheetsPython beginner quiz
Total questions: 13
Worksheet time: 7mins
Name
Class
Date
1.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
2.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
3.
A loop repeated if the condition is true / false
a)
While loop
b)
For loop
c)
Repeat loop
d)
If...else
4.
Which Python command is used to output information to the screen?
a)
read
b)
output
c)
print
d)
display
5.
The order of the code
a)
Sequence
b)
Selection
c)
Iteration
d)
Variable
6.
To repeat a fixed number of times use a
a)
while loop
b)
for loop
c)
if loop
d)
indentation
7.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus +
c)
forward slash /
d)
asterisk *
8.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
9.
What will be the output?
name = 'Dave'
print (name)
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
10.
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
a)
Good morning 'Dave'
b)
Good morning Dave
c)
Good morning name
d)
Good morning + Dave
11.
Which of these would work as a piece of code?
a)
IF answer == "Yes":
b)
if answer == "Yes"
c)
if answer == "Yes":
d)
if answer = "yes":
12.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
13.
What is the meaning of the following comparison operator?
a != b
a != b
a)
Equal to
b)
Greater than
c)
Not equal to
d)
Less than or equal to
Reset
