wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pseudocode

Total questions: 20

Worksheet time: 12mins

Name
Class
Date
1.

A condition is

a)

a statement that is either True or False

b)

a string

c)

an integer

d)

a list

2.

We need variables to:

a)

store and manipulate data.

b)

store data.

c)

manipulate data.

d)

make fun of students.

3.

When a piece of code runs unintentionally forever it is known as

a)

An infinite loop

b)

A long loop

c)

A broken loop

d)

A for loop

4.

Which are the lines that contains errors

a)

3,4,6,7

b)

5,6,7,9

c)

5,6,8,9

d)

2,3,4,9

5.

IF statement is a ___________________________ statement?

a)

Assignment

b)

Sequence

c)

Selection

d)

Loop

e)

Honestly , I don't know

6.

Will the following loop run?

a)

Yes

b)

No

7.
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. 
8.
Which of the following is the definition of a comment?
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. 
9.
Which of the following is the definition of pseudocode?
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. 
10.
Which of the following is the definition of a constant?
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. 
11.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
Which part is the identifier?
a)
10
b)
=
c)
distanceToSchool
12.
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
13.
When variable identifiers are compound words snake case and camel case can be used. Which variable identifier below is using camel case?
a)
yourName=input("What is your name? ")
b)
yourname=input("What is your name? ")
c)
YOURNAME=input("What is your name? ")
d)
your_name=input("What is your name? ")
14.
Which of the following assignment statements is assigning a number .
a)
myAge = 21
b)
myAge = "21"
15.
Which of the following assignment statements is assigning text.
a)
myName = "David"
b)
myAge = 21
16.
A constant is normally written in lower case.
a)
True
b)
False
17.
Which is the correct way to get the user to enter a value when written as pseudocode?
a)
input (“Please enter the length”)
b)
length == input ("Please enter the length")
c)
length = (“Please enter the length”)
d)
length = input (“Please enter the length”)
18.
When writing pseudocode it is a good idea to add comments to explain to others, and often to remind yourself, what the code is intended to do. 
To separate these comments from the actual code, what character(s) are used?
a)
:
b)
//
c)
()
d)
#
19.
a)

3

b)

6

c)

10

d)

18

e)

It will be different each time you run it

20.
a)

All done.

b)

Inside the If.

c)

Inside the if.

All done.

d)

Inside the else.

All done.

e)

Inside the if.

Inside the else.

All done.