wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Coding and Python Revision

Total questions: 21

Worksheet time: 12mins

Name
Class
Date
1.
What is python?
a)
A programming language 
b)
DTP software 
c)
Spreadsheet software
d)
Computer 
2.

What term is used for whole numbers in programming?

a)

integer

b)

string

c)

boolean

d)

float

3.

What term is used for words or characters in programming?

a)

Float

b)

Boolean

c)

Integer

d)

String

4.
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 
5.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
6.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
7.

Sonam has written this program in Python. One of the lines contains at least one error. Which line is it?

a)

print(“Hello world!”)

b)

name=input(‘please enter your name’)

c)

print(happy to meet you)

d)

print(‘you have great name’)

8.

Which of the following is an integer?

a)

8

b)

4.5

c)

print

9.

How would you display the message "Hello world" on the screen?

a)

print("Hello world")

b)

print "Hello world"

c)

print (Hello world)

10.

What will the program print?

number = 10

print(number+10)

a)

20

b)

10

c)

number+10

11.

How would this run:

print ("Hello, World!")

a)

Hello, World!

b)

("Hello, World!")

c)

"Hello, World!"

12.

What is a variable?

a)

A piece of code that stores information

b)

a type of graphics

c)

Data type

d)

a type of memory

13.
What will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
14.
Which of these is the correct way to print a string?
a)
print="Hello World"
b)
Print=("Hello World")
c)
print=("Hello World")
d)
print(Hello World)
15.
What will the output be from the following code?
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)
16.

What is the Python code needed to ask a user for input?

a)

input("what is your name?")

b)

input="what is your name?"

c)

(input)=what is your name?

d)

input=what is your name?

17.
What is an error in a program that prevents the program from running as expected?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
18.
What is finding and fixing errors in programs?
a)
Debugging
b)
Program
c)
Bug
d)
Code
19.

What is a computer program?

a)

A set of instructions to the computer written in a programming language

b)

A TV show about computers

c)

A piece of software that you use to write code

d)

A set of instructions written on a piece of paper

20.

What is an algorithm?

a)

A computer program

b)

A programming language

c)

A mistake in your code

d)

A set of precise instructions used to solve a problem.

21.

Why must a computer program be translated?

a)

because computers only understand computer language

b)

because computers only understand binary code (1's and 0's)

c)

because computers only understand French

d)

to make it harder for you to understand the code