wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

An intro to Python

Total questions: 25

Worksheet time: 13mins

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.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
3.
What will the output be from the following code?
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
4.
What will the output be from the following code?
Print("Hello world!")
a)
NameError
b)
Hello world!
c)
"Hello world"
d)
Print(Hello world!)
5.
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
6.
What will the output be from the following code?
print("Hello world!\nHello world!")
a)
Hello world! Hello world!
b)
Hello world!
Hello world!
c)
SyntaxError
d)
Hello world!
7.
What will the output be from the following code?
print("Hello world!" * 2)
a)
TypeError
b)
Hello world world!
c)
Hello world!Hello world!
d)
Hello world! * 2
8.
What will the output be from the following code?
print(9/3)
a)
3
b)
3.0
c)
9/3
d)
SyntaxError
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 print("hello) display?

a)

hello

b)

gives you an error

c)

"hello"

d)

"hello

13.

Define what is meant by a 'high level programming language'

a)

Also known as machine code, read by the computer

b)

A language that uses words close to what humans use.

14.

Identify an example of a high level programming language

a)

Python

b)

Binary

15.

Define what is meant by a 'variable'

a)

Converts high level programming language into a low-level language

b)

Identifying an error and fixing it

c)

Statements or words used in a programming language e.g. print

d)

A named memory location, that stores a value, that can change

16.

Describe the purpose of a 'translator'

a)

Converts high level programming language into a low-level language

b)

Identifying an error and fixing it

c)

Statements or words used in a programming language e.g. print

d)

A named memory location, that stores a value, that can change

17.

Which data type would be suitable for someone's age?

a)

An integer

b)

A string

c)

A float

d)

A boolean value

18.

Which data type would be suitable for a calculation that involved multiplying a whole number by a number with 2 decimal places?

a)

An integer

b)

A string

c)

A float

d)

A boolean value

19.

An expression can often be evaluated as true or false, for instance print(10>9) would return as true. What is this an example of?

a)

A string

b)

A boolean value

c)

A float

20.
What is python named after
a)
The snake
b)
Television show called Monty Python
21.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
22.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
23.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
24.
How do you display text?
a)
input
b)
output
c)
print
d)
variable 
25.
What is python?
a)
a programming language 
b)
DTP software 
c)
Spreadsheet software
d)
Computer