wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Year 7 Python Revision

Total questions: 38

Worksheet time: 23mins

Name
Class
Date
1.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
2.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language
3.
What is python?
a)
a programming language 
b)
DTP software 
c)
Spreadsheet software
d)
Computer 
4.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
5.
What is the correct definition for a VARIABLE?
a)
a changeable value, such as a score in a computer game.
b)
a value that cannot be changed
6.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
7.

What is the output from the following code?

print ("hello world")

a)
Hello World
b)
hello world
c)
print hello world
8.

What is the Python built-in function used to display numbers and text on the screen?

a)

print

b)

input

c)

output

d)

command

9.

The punctuation requirements for printing a string in Python are:

a)

( ) , ! and " "

b)

( ) and !

c)

( ) and " "

d)

" " and !

10.
what is correct code for INTEGER in python?
a)
in
b)
ing
c)
int
11.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
12.
What will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
13.

To output hello world! which would be the correct python line of code

a)

output("Hello World!)

b)

Print("Hello World!)

c)

print("hello world!)

d)

print("hello world")

14.

What is the variable in the code shown

a)

variable

b)

Name

c)

print

d)

name

15.

What key term in python allows the user to answer a question

(a)  

16.

Fill in the blank to output in python:

(a)   ("Hello World")

17.

Fill in the blank to input in python:

(a)   ("Please enter your name: ")

18.

What is the operator to ADD in python?

a)

+

b)

-

c)

*

d)

/

19.

What is the operator to DIVIDE in python?

a)

+

b)

-

c)

*

d)

/

20.

What is the operator to SUBTRACT in python?

a)

+

b)

-

c)

*

d)

/

21.

What is the operator to SUBTRACT in python?

a)

+

b)

-

c)

*

d)

/

22.

What is the operator to MULTIPLY in python?

a)

+

b)

-

c)

*

d)

/

23.

What do we use to store data in programming?

a)

Sub-Routine

b)

Iteration

c)

Variable

d)

Sequence

24.

What would the following code output if the user entered 29?

a)

You are over 18

b)

You are under 18

25.

What data type is whole numbers?

a)

Float

b)

String

c)

Integer

d)

Boolean

26.

What in the name of the variable in this Python code?

a)

name

b)

input

c)

print

d)

("What is your name")

27.

How many variables are there in this program?

a)

2

b)

3

c)

4

d)

5

28.

Text to be output to the screen should be enclosed by " "

a)

True

b)

False

29.

What is a character in Scratch called?

a)

Bat

b)

Cat

c)

Sprite

d)

Crab

30.

What is the default Sprite when you open Scratch?

a)

Cat

b)

Dog

c)

Bat

d)

Crab

31.

Which block allows you to make decisions (choices)?

a)
b)
c)
d)
32.

Which of the following symbols means "greater than"?

a)

<

b)

**

c)

/

d)

>

33.

Leo is writing a "Digital Pet" program in Scratch. What is Leo using here to store how thirsty his pet is?

a)

A costume

b)

A sprite

c)

A function

d)

A variable

34.

What type of block is this?

a)

Iteration

b)

Variable

c)

Sequence

d)

Selection

35.

What type of scratch block is this?

a)

Input

b)

Output

c)

Variable

d)

Selection

36.

What type of scratch block is this?

a)

Input

b)

Output

c)

Variable

d)

Selection

37.

What type of scratch block is this?

a)

Input

b)

Output

c)

Variable

d)

Selection

38.

What type of scratch block is this?

a)

Input

b)

Output

c)

Variable

d)

Selection