wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

YEAR 9

Total questions: 81

Worksheet time: 2hrs 2mins

Name
Class
Date
1.

Algorithm is a

a)

Step by step procedure

b)

difficult procedure

c)

complex

d)

hard steps

2.
Programming languages give computers instructions
a)
True
b)
False
3.
When can algorithms be used?
a)
Only with computers
b)
Only when programming
c)
Only with flowcharts
d)
Any time to design solutions to problems
4.

____________________________ must be organized properly.

a)

Puzzle

b)

Quiz

c)

Flowchart

d)

Algorithm

5.
What is an Algorithm?
a)
A chart showing the flow of a series of events
b)
Step-by-step instructions used to solve a problem
c)
A decision arrived at by following instructions
d)
A computer program that follows a chart
6.
Start
Put your hand on the doorknob
Turn the doorknob to the side until it unlocks the door
Push or pull  the door to open it
End
..................................................
What would be an appropiate title for this algorithm?
a)
How to push a door
b)
Steps to stand infront of a door
c)
Steps to touch a doorknob
d)
How to open a door
7.

What should be considered when designing an algorithm?

a)

If there is more than one way of solving the problem

b)

If the correct hardware is being used

c)

If the correct software is being used

8.

A boolean is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

9.

An integer is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

10.

The best data type for an age is...

a)

integer

b)

real

c)

string

d)

boolean

11.

The best data type for a name is...

a)

integer

b)

real

c)

string

d)

boolean

12.
Which of the following is the definition of a variable?
a)
A container which is used to store values such as the number of attempts a person tries to log on to a network.
b)
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
c)
A value that cannot be altered by the program during normal execution: the value stays the same. 
d)
Messages to explain to others, and often to remind yourself, what the code is intended to do. 
13.

If a grade of 98 was inputted, what would be the output?

a)

Passed

b)

Failed

c)

Else

14.

what is the purpose of an If else statement

a)

Outputs a message on the screen

b)

Gets data from the user

c)

A decision

d)

A loop controlled by a decision

15.

What is the output?

a)

True

b)

False

c)

condition1

d)

condition2

16.

What is the output of the code?

a)

"String"

b)

"No string"

c)

18

d)

none of the above

17.

Which is NOT a data type in Python?

a)

integer

b)

boolean

c)

anchor

d)

float

18.

print( (a)   ("What is your favourite colour?")

19.

What is the correct programming name of this symbol?


()

a)

brackets

b)

parenthesis

c)

quotation marks

d)

smiley emoji

20.

What is the correct term for this symbol?


" "

a)

Quotation marks

b)

Bunny fingers

c)

Parenthesis

d)

Exclamation mark

21.

What does this symbol represent?


>

a)

Less than

b)

Greater than

c)

Equal to

d)

Less than or equal to

22.

What does this operator do? ' * '

a)

Divide

b)

Add

c)

Subtract

d)

Multiply

23.

if 4 >= 2 and 3 <= 8:

print("true)

else:

print("false")

a)

True

b)

False

24.
How many choices are possible when using a single if-else statement?
a)
1
b)
2
c)
3
d)
4
25.

In Python, what are if-statements used for?

a)

Looping

b)

Indexing

c)

Decision Making

d)

Testing

26.
A variable represents what is ______________. 
a)
the answer
b)
the operation
c)
the difference
d)
unknown 
27.

Look at the following code:

name = "John"

age = 23

What type of data is stored in the variable age?

a)

str

b)

int

c)

float

d)

nothing

28.

Look at the following code:

name = "John"

age = "23"

What type of data is stored in the variable name?

a)

str

b)

int

c)

float

d)

nothing

29.

---------------------- is a reference to a location in memory where the data is stored.

a)

Variable

b)

python

c)

Vakue

d)

Operators

30.

x= False , x is type of -----------

a)

Integer

b)

Boolean

c)

Float

d)

String

31.

What is a variable?

a)

It is changeable

b)

It means that you may have a constant or a varying in data types

c)

It is the name you give to computer memory locations which are used to store values in a computer program

32.
What is missing from this program – print(hello)?
a)
‘‘  ’’
b)
:: 
c)
??
d)
***  ***
33.
Which data type represents a whole number?
a)
integer
b)
string
c)
float
d)
Boolean
34.
What command do we use to tell Python to accept an input?
a)
cin
b)
input()
c)
scanf()
d)
<>
35.
What does the statement 'print' do?
a)
Output a hard copy of a program to a printer
b)
Output a message on the screen
c)
Print a hard copy of a flowchart to a computer
36.
What happens at the Decode step of the fetch-decode-execute cycle?
a)
The CPU makes sense of the instructions.
b)
The CPU fetches the information from RAM.
c)
The instructions are executed.
37.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
What is the value of the variable?
a)
10
b)
=
c)
distanceToSchool
38.
Which of the following assignment statements is assigning text.
a)
myName = "David"
b)
myAge = 21
39.
What algorithm do we use when we're building a wardrobe?
a)
A set of directions
b)
A recipe
c)
A list of instructions
40.
When can algorithms be used?
a)
Only with computers
b)
Only when programming
c)
Only with flowcharts
d)
Any time to design solutions to problems
41.

Instructions carried out one after another in order is a...

a)

List

b)

Sequence

c)

Collection

d)

Series

42.

Instructions carried out one after another in order is a...

a)

List

b)

Sequence

c)

Collection

d)

Series

43.

Which is the definition of "sequence"?

a)

A set of instructions in a specific order

b)

Where instructions repeat

c)

Code where decisions are made

44.

Which is the definition of "selection"?

a)

A set of instructions in a specific order

b)

Where instructions repeat

c)

Code where decisions are made

45.

An algorithm must be _______ (choose more than 1)

a)

Clear instructions

b)

Easy to understand

c)

Complex

d)

Exact

46.

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

a)

name

b)

input

c)

print

d)

("What is your name")

47.

Which of these is not an arithmetic operator?

a)

+

b)

-

c)

*

d)

=

48.

Which of the following would allow the user to enter data?

a)

elif

b)

output

c)

print

d)

input

49.

Which code would display 'Hello World'

a)

Print("Hello World")

b)

print("Hello World")

c)

print(Hello World)

d)

print=("hello world")

50.

Which of the following is NOT a suitable variable name?

a)

num1

b)

Num1

c)

MyName

d)

My name

51.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
52.
What is python?
a)
a programming language 
b)
DTP software 
c)
Spreadsheet software
d)
Computer 
53.

What are the three basic programming constructs?

a)

Sequence, selection and iteration

b)

Sequence, selection and looping

c)

Sequence, iteration and looping

d)

Sequence, execution and selection

54.

What does 'syntax' mean?

a)

The structure of statements in a computer language.

b)

The written algorithm

c)

The way a flowchart flows

55.
if num < 5: print("The number is larger than 5")
a)
Syntax Error
b)
Logic Error
56.
A program won't run if there is a logic error
a)
True
b)
False
57.
Using incorrect comparison operators such as < or > is an example of what type of error
a)
Syntax Error
b)
Logic Error
58.
print(Hello",name)
a)
Syntax Error
b)
Logic Error
59.
Syntax errors are always spotted when the program is compiled or interpreted
a)
True
b)
False
60.
A program will still run even with this type of error
a)
Syntax Error
b)
Logic Error
61.
Which statement best describes logic errors?
a)
An error in a program that causes it to produce incorrect ouputs but not a crash.
b)
An error in a program that causes it to crash.
c)
An error in the program caused by mis-spelt instructions.
d)
An error in a program caused by hardware failure.
62.

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

63.

What programming concept is being shown here?

a)

SEQUENCING

b)

SELECTION

c)

ITERATION

64.

a (a)   is a place in memory we can save data, that can change.

65.

Which statement is used to implement selection?

a)

IF

b)

WHILE

66.

Which variable data type is 'Harris Academy Clapham' an example of?

a)

String

b)

Integer

c)

Float

d)

Boolean

67.

A data type consisting of only two (2) options.

a)
String
b)
Integer
c)
Float
d)
Boolean
68.
Which is the most appropriate data type for: 34.9
a)
Float
b)
Boolean
c)
Integer
d)
String
69.

What is the word (command) used to display output within Python?

a)

print

b)

input

c)

output

d)

display

70.

What function is used to output a message in python?

a)

print ("")

b)

print = ("")

c)

print

d)

Print ("")

71.

What syntax would you use to create a name variable in Python?

a)

name=input()

b)

input=name

c)

name=input{}

d)

name=INPUT

72.

A data type consisting of numbers with decimals.

a)

integer

b)

float / real

c)

string

d)

boolean

73.

What is Selection?

a)

loops

b)

if statements

c)

list

d)

database

74.

What is a input?

a)

A function that allows us to ask the user to enter some data.

b)

To plug in something.

c)

Data displayed on a screen.

d)

A function

75.

What is a output?

a)

A piece of data that is shown on the screen.

b)

Data that the user enters

c)

An output

d)

A orange

76.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
77.
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 
78.

Which of the following types of computer languages uses binary code to communicate with the computer?

a)

High-level languages

b)

Assembly languages

c)

Machine language

d)

Database languages

79.

Which is NOT a data type in Python?

a)

integer

b)

boolean

c)

anchor

d)

float

80.

Which is correct?

a)

A

b)

B

81.

What operator is being used in this program?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to