NEW
Font size
WorksheetsYear 8 | Intro to Python | Quiz 1
Total questions: 15
Worksheet time: 8mins
What is a program?
A program is a set of instructions expressed in a programming language.
What is an algorithm?
An algorithm is a step-by-step set of instructions for solving a problem.
Is a recipe an example of a program or an algorithm?
Algorithm
Program
In programming what is a variable?
A variable is a name for a storage location that can hold a value and may change during program execution.
Which version of a print() statement will run?
print("Hello, World!")
PRINT("Hello, World!")
Print('Hello World!'
What does the = sign mean in the following line of code:
name = "Brett"
?
Name is equal to Brett
Brett is being saved to the name variable
"Brett" is being saved to the name variable
Brett is equal to name
What key command word do we use if we want the user to enter data?
print()
if
input()
output()
Which of the following is a valid variable name in most programming languages?
1variable
variable_name
variable-name
variable name
What does print() do in Python?
What is wrong with the following code?
The code does not need a comma.
The code is missing a bracket.
The code is missing it's speech marks
What is wrong with the following code?
Input is spelt wrong
Missing speech marks
Missing brackets
Two words for the variable name
How many errors are in this piece of code?
1
2
3
4
Identify the correct line of code to fix all the errors.
print"Hello, name)
print("Hello, name)
print("Hello", name)
PRINT("Hello, name")
Identify the variable
name
Mrs Malaney
Hello
On which line is the variable declared?
1
2
