wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Beginner Python KS3 Revision

Total questions: 26

Worksheet time: 14mins

Name
Class
Date
1.

Why do we learn Python?

a)

It's a really big snake

b)

It's the name of a very funny comedy show

c)

It's simple and easy to learn

d)

It's so rare that no one else knows it

2.
What will the output be from the following code?
print("Hello world!")
a)
SyntaxError
b)
Hello world!
c)
"Hello world!"
d)
print(Hello world!)
3.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
4.
What will the output be from the following code?
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
5.
What will the output be from the following code?
Print("Hello world!")
a)
NameError
b)
Hello world!
c)
"Hello world"
d)
Print(Hello world!)
6.
What will the output be from the following code?
print("Hello" + "world" + "today")
a)
Helloworldtoday
b)
Hello world today
c)
"Hello" "world" "today"
d)
SyntaxError
7.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
8.
Which function takes a users input
a)
print()
b)
int()
c)
input()
d)
def
9.
A data type consisting of numbers, letters and symbols.
a)
String
b)
Integer
c)
Float
d)
Boolean
10.
Which is the most appropriate data type for: "13th December"
a)
Float
b)
Boolean
c)
Integer
d)
String
11.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
12.
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
13.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
14.
What will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
15.
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
a)
Good morning 'Dave'
b)
Good morning Dave
c)
Good morning name
d)
Good morning + Dave
16.
In the following expression which element is a comparison operator?
if a > b:
           print(a)
a)
a
b)
>
c)
b
d)
if
17.
What is the meaning of the following comparison operator?
a > b
a)
Greater than
b)
Less than
c)
Not equal to
d)
Greater than or equal to
18.
What is the meaning of the following comparison operator?
a >= b
a)
Equal to
b)
Not equal to
c)
Greater than or equal to
d)
Less than or equal to
19.
IF and ELSE are used when a program needs to make a what?
a)
Repeat
b)
Decision
c)
Change
d)
Output
20.
a)
You can buy some chocloate
b)
You are rich!
c)
Get a job!
d)
You almost have enough
Get a job!
21.
a)
You can buy some chocolate
b)
You are rich
c)
You almost have enough
d)
Get a job!
22.
What is syntax?
a)
Syntax is the word used to describe a variable
b)
Syntax is the rules of the programming language
c)
This is used to read information
d)
It is used to output information 
23.
The following code is used to create a variable and store a value. Why will it NOT work?
my number = 36
a)
The variable can't store a number
b)
A variable name cannot have any spaces
c)
There variable name can't be called my number
d)
The equals symbol should be at the beginning of the line
24.
The following variable contains some data. What is the data type that is being stored.
hobby = "football" 
a)
Integer
b)
Float
c)
String (Text)
d)
Boolean
25.

age = int(input("enter your age"))

if age >= 18:

print ("You are an adult")

else:

print("You are a child")


what is the output if the user enters (18)?

a)

You are a child

b)

You are an adult

c)

nothing

26.

score = int(input("enter your score"))

if score > 60 and score <70:

print("pass")

elif score >70 and score <80:

print("merit")

else :

print("distinction")


what is the output , if the user enters(85)

a)

pass

b)

distinction

c)

merit