NEW
Font size
S
M
L
XL
WorksheetsYear 7 Python: quiz 1
Total questions: 15
Worksheet time: 8mins
Name
Class
Date
1.
The language we are learning is called...
a)
Python
b)
Java
c)
C++
d)
French
2.
What does the word 'syntax' mean?
a)
The rules that govern how a language is structured.
b)
An instruction that you give a computer.
c)
A unique name that can be referred to later for a function or a variable.
d)
A section of code that will be ignored when it is compiled. Useful for explaining your code.
3.
What does the word 'command' mean?
a)
An instruction that you give a computer.
b)
A unique name that can be referred to later for a function or a variable.
c)
A section of code that will be ignored when it is compiled. Useful for explaining your code.
d)
The rules that govern how a language is structured.
4.
What does the word 'identifier' mean?
a)
A unique name that can be referred to later for a function or a variable.
b)
A section of code that will be ignored when it is compiled. Useful for explaining your code.
c)
The rules that govern how a language is structured.
d)
An instruction that you give a computer.
5.
What does the word 'comment' mean?
a)
A section of code that will be ignored when it is compiled. Useful for explaining your code.
b)
The rules that govern how a language is structured.
c)
An instruction that you give a computer.
d)
A unique name that can be referred to later for a function or a variable.
6.
An identifier can begin with a number.
a)
false
b)
true
7.
An identifier can begin with an underscore.
a)
true
b)
false
8.
Which of the following is a valid identifier?
a)
total
b)
0total
c)
1range
d)
$cost
9.
Which of the following is a valid function call?
a)
forward()
b)
forward(
c)
forward)
d)
forward(;
10.
How would you call a function called 'thisFunction'?
a)
thisFunction()
b)
call thisFunction()
c)
thisfunction();
d)
thisFuncton()
11.
Identifiers in Python are CaSe sEnSiTiVe.
a)
true
b)
false
12.
4500 is a valid identifier in Python.
a)
false
b)
true
13.
The parentheses at the end of a function call, e.g. thisFunction(), are optional.
a)
false
b)
true
14.
Commented lines of code affect your program.
a)
false
b)
true
15.
What does a loop do?
a)
It allows you to execute the same code a number of times.
b)
It allows you to execute a set of code a predetermined number of times.
c)
It prevents you from doing something more than once.
d)
It checks your data entry.
Reset
