NEW
Font size
S
M
L
XL
WorksheetsY7 End Point Python Homework
Total questions: 20
Worksheet time: 9mins
Name
Class
Date
1.
What is a Count-Controlled loop?
a)
for loop
b)
while loop
2.
A count controlled loop will..
a)
Repeat code until a condition is met
b)
Repeat code a specific amount of times
c)
Repeat code a random amount of times
d)
None of the above
3.
What sort of loop is this?
a)
Count Controlled
b)
Condition Controlled
4.
Which of these is NOT a loop in python?
a)
for loop
b)
while loop
c)
nested loop
d)
if loop
5.
Which of these operators means EQUAL TO?
a)
'='
b)
'=>'
c)
'<='
d)
'=='
6.
What will be the output of this code?
a)
1,2,3,4,5,6,7,8,9,10,11,12
b)
0,2,4,6,8,10
c)
2,4,6,8,10,12
d)
2,4,6,8,10
7.
What does the '#' allow you to do?
a)
Repeat code
b)
Comment on code
c)
Print code
d)
End code
8.
A condition controlled loop is...
a)
A while loop
b)
A for loop
9.
The second part of if, that is executed when the condition is false
a)
if
b)
else
c)
for
d)
input
10.
Python identifies blocks of code by
a)
BEGIN and END keywords
b)
{ and }
c)
aligning up the starts of lines (indentation)
d)
guessing
11.
stores a piece of data, and gives it a specific name
a)
variable
b)
whitespace
c)
interpreter
d)
modulo
12.
a line of text that Python won't try to run as code
a)
comment
b)
modulo
c)
variable
d)
boolean
13.
To repeat until a particular condition is true use
a)
while loop
b)
for loop
c)
if loop
d)
indentation
14.
a data type than can have one of two values: True or False
a)
boolean
b)
variable
c)
modulo
d)
interpreter
15.
Code executed based on a condition being true
a)
Sequence
b)
Selection
c)
Iteration
d)
Variable
16.
To solve a problem that requires the user to enter 10 numbers would use what type of iteration?
a)
While loop
b)
For loop
c)
Variable
d)
Selection
17.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
18.
What syntax can you use to insert a line break between strings so that they appear over multiple lines?
a)
/
b)
\n
c)
\l
d)
n
19.
What is syntax?
a)
Syntax is the word used to describe an error
b)
Syntax is the rules of the programming language
c)
It is used to read information
d)
It is used to output information
20.
What will the output be from the following code?
print("Hello world!")
print("Hello world!")
a)
SyntaxError
b)
Hello world!
c)
"Hello world!"
d)
print(Hello world!)
Reset
