wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IGCSE Unit 7 Algorithms & problem solving

Total questions: 108

Worksheet time: 1hrs 26mins

Name
Class
Date
1.
What is the purpose of a flowchart?
a)
To plan the program before it is made
b)
Because it is easier
2.
Why do we use flowcharts?
a)
To represent algorithms in an easy way
b)
To use different maths shapes
3.
What does this symbol represent?
a)
Start
b)
Sub
c)
Decision
d)
Process
4.
What is this symbol used for in a flowchart?
a)
A decision/question
b)
A task to carry out
5.
What symbol do flowcharts begin with?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
6.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
7.
What's missing from this part of a flowchart?
a)
An Arrow
b)
A Line
c)
A Square
d)
A Diamond
8.

What symbol shows something you need to do?

a)

oval

b)

parallelogram

c)

rectangle

d)

diamond

9.

Which symbol shows input?

a)

oval

b)

parallelogram

c)

rectangle

d)

diamond

10.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
11.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
12.

What will happen if the user's book return is late?

a)

Sends them an SMS (text)

b)

Does not send them an SMS (text)

13.
What is an algorithm?
a)
A problem
b)
A solution to a problem
c)
The steps that are taken to solve a problem
d)
The words to enter when typing
14.

A diagram to show each step

a)

Flowchart

b)

Algorithm

15.

A flowchart does not need to have a Start

a)

True

b)

False

16.

How many arrows should come out of a decision symbol in a flowchart?

a)

0

b)

1

c)

2

d)

3

17.

How many arrows come out of the end symbol in the flowchart?

a)

0

b)

1

c)

2

d)

3

18.
Which loop can you use for an exact number of times?
a)
for
b)
while
19.
If I want to use a loop to make sure I check my math answers exactly three times, which loop would I use?
a)
for
b)
while
20.
Which loop can you use to keep checking a program until finally works?
a)
for
b)
while
21.
Which loop can you use to keep checking if something is true? You don't know how many times you'll need it to loop?
a)
for
b)
while
22.
Which symbol show sequence, direction of flow, or the order in which a chart is read?
a)
diamond
b)
parallelogram
c)
retangle
d)
arrow
23.
What is an Algorithm?
a)
A set of instructions in order
b)
A task for the computer
24.
What is the name of this symbol in a flowchart?
a)
Input
b)
Output
c)
Decision/Question
d)
Process
25.
Can this shape be used for both Start and Stop?
a)
Yes
b)
No
26.
What is the purpose of an arrow in a flowchart?
a)
Shows the relationships between shapes/ the flow of information
b)
They look nice when we use them
c)
We don't use arrows
d)
Shows the way the arrow is directed
27.

What are the two main ways that algorithms can be designed?

a)

Images or videos

b)

In pseudocode or as a flowchart

c)

By hardware or software

28.

What is pseudocode?

a)

A way of describing a set of instructions in text form

b)

A specific programming language that all computers use

c)

A diagrammatic representation of a set of instructions

29.

What is important to remember when designing an algorithm?

a)

whether to use a flowchart or pseudocode

b)

the instructions are in the correct order

c)

that it must be easy to read

30.

What is missing on the following flowchart?

a)

Arrows

b)

Flow lines

c)

Terminators

d)

Process symbols

31.

This flowchart is made to...

a)

Calculate the area and perimeter of a square

b)

Output figures of different sizes

c)

Calculate the area and perimeter of a circle

d)

Find out how long it takes to get to the moon

32.

In this flowchart, r ...

a)

is the radius of a circle

b)

stands for random number

c)

represents a running total

d)

is a miscellaneous variable

33.

This flowchart is made to ...

a)

find out which of two numbers is the biggest

b)

add two numbers together and output the larger result

c)

input two numbers and expand them

34.

By examining this flowchart we can tell that the temperature in the flowchart ...

a)

is not in Dubai

b)

must be measured in Fahrenheit

c)

is being measured in Celsius

35.
Which data type is used to store:
100
a)
Integer
b)
Double
c)
Boolean
d)
String
36.
Which data type is used to store:
TRUE
a)
Boolean
b)
Double
c)
String
d)
Integer
37.
Which data type is used to store:
"D"
a)
Character
b)
String
c)
Integer
d)
Double
38.
This data type is used to store whole numbers
a)
Integer
b)
Double
c)
Boolean
d)
String
39.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
40.

What is a variable?

a)

A storage location of memory which can change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

41.

What is a Constant?

a)

A storage location of memory which does not change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

42.

Define the term ‘Algorithm’

a)

The process of filtering out the characteristics of problems that are not needed in order to concentrate on those that are needed

b)

An algorithm is a set of steps/instructions needed to complete a software task.

c)

The process of breaking down a complex problem into a series of more manageable problems

d)

Identifying patterns

43.

What value would be output if a = 6 and b = 6?

a)

4

b)

12

c)

2

d)

24

44.
What is pseudocode?
a)
Simplified programming language, that is not a specific language
b)
Complicated programming language
c)
Simple programming language, which is linked to a specific language
d)
A type of cheese
45.
What does this pseudocode do?
print "Hello"
a)
Nothing
b)
Prints the word "Hello" to the output
c)
hello is print in pseudocode
d)
The code won't work
46.

Which of these is NOT an algorithm?

a)

Following recipe instructions

b)

Working out how an engine works

c)

Tying your shoelaces

d)

Making a cup of coffee

47.

What is a sequence

a)

Putting and executing instructions in order.

b)

A pattern of numbers.

c)

Instructions which a computer follows.

d)

A line of code

48.

What are the three algorithm constructs?

a)

Sequence, Selection, Iteration

b)

Input, Process, Output

c)

Input/output, decision, terminator

d)

Loop, input/output, process

49.

Variables are assigned an identifier. The identifier should be:

a)

not too long

b)

have a sensible name

c)

not start with a number

d)

not start with a capital letter

e)

all of the above

50.

What is a "Variable" ?

a)

A value that can be changed and manipulated as an algorithm is running

b)

A value that cannot be changed and manipulated as an algorithm is running

51.

firstName is and example of what commonly used way to name a variable

a)

camelcase

b)

snakecase

c)

linecase

d)

hillcase

52.

This an example of:

a)

a nested if

b)

a combined if

c)

a multiple if

d)

a sequence if

53.

Case statements can be used in some languages instead of:

a)

a nested if

b)

a combined if

c)

a multiple if

d)

a sequence if

54.
What is my result?
mickey = mouse                                   .
if mickey == mouse:                           .
.            print("Mickey is a mouse")
.else:                                                             .
.         print("Minnie rules")        .
a)
"Mickey is a mouse"
b)
"Minnie rules"
c)
Nothing prints.
d)
"Mickey is a mouse" & "Minnie rules"
55.
What is my result?
john = 5                                                                        .
if john > 6:                                                                  .
.            print("John is getting ice cream")
else:                                                                               .
.               print("John is getting apple juice")
print("John is getting grapes")                    .
a)
John is getting ice cream
John is getting grapes
b)
John is getting apple juice
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
56.
What is my result?
john = 5                                                                        .
if john > 6:                                                                  .
.            print("John is getting ice cream")
else:                                                                               .
.               print("John is getting apple juice")
.      print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
b)
John is getting apple juice
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
57.
What is my result?
john = 8                                                                        .
if john > 6:                                                                  .
.            print("John is getting ice cream")
else:                                                                               .
.               print("John is getting apple juice")
.      print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
b)
John is getting apple juice
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
58.
What is my result?
john = 3                                                                        .
if john < 6:                                                                  .
.            print("John is getting ice cream")
else:                                                                               .
.               print("John is getting apple juice")
print("John is getting grapes")                     .
a)
John is getting ice cream
John is getting grapes
b)
John is getting apple juice
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
59.
What is my result?
john = 6                                                                        .
if john != 6:                                                                  .
.            print("John is getting ice cream")
else:                                                                               .
.               print("John is getting apple juice")
.      print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
b)
John is getting apple juice
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
60.

If X is odd and Y is even, then X must have a greater value than Y. Which example(s) support this statement?

a)

X = 3, Y = 2

b)

X = 4, Y = 3

c)

X = 11, Y = 12

d)

X = 2, Y = 2

61.

If X has a greater value than Y, then X must have a greater absolute value than Y. Which example(s) support this statement?

a)

X = 12, Y = -2

b)

X = 20, Y = -13

c)

X = 12, Y = 13

d)

X = 3, Y = -4

62.

If the absolute value of X and Y are the same, then the value of X and Y must also be the same. Which example(s) support this statement?

a)

X = 2, Y = 2

b)

X = -4, Y = 4

c)

X = 5, Y = -10

d)

X = -10, Y = 10

63.

If X is 10, then X must have a greater value than Y. Which example(s) support this statement?

a)

X = 1, Y = 18

b)

X = 10, Y = -2

c)

X = 10, Y = 11

d)

X = 9, Y = -13

64.

The "If" Statement is an example of a _________________

a)

Correctional Statement

b)

Competitive Statement

c)

Conditional Statement

d)

Inquisitive Statement

65.

Which of these is the correct format of an "if" statement?

a)
b)
c)
d)
66.

How many "if" statements can a single program have?

a)

<10

b)

<20

c)

<30

d)

As many as is needed

67.

True/False: The body of an "if" statement will only be executed if the condition is true.

a)

True

b)

False

68.

What happens to the code in the body of an "if" statement if the condition is false?

a)

The computer determines if it is essential to the program and if it is, then the code is executed anyway.

b)

The code moves to a coastal city, attempting to find love and start a family. However, low waged and crushing mortgage rates lead to it moving back home where it sits, hoping that one day it will be executed.

c)

The code is skipped.

d)

The code stages a revolution and attempts to take over the program, ultimately unsuccessfully, which leads to it not being executed.

69.

Which of these can be paired with an "if" statement to represent other outcomes of a scenario?

a)

or

b)

else

c)

but

d)

sheboygan

70.

Which of these is the correct format for an "if/else" statement?

a)
b)
c)
d)
71.

How many "else" statements can you pair with a single "if" statement

a)

1

b)

<10

c)

<20

d)

As many as is needed.

72.

Which of these is the proper format of an "else/if" chain statement?

a)
b)
c)
73.

What will be the output of the code?

a)

Even

b)

EvenDivisible by 3

c)

Even

Divisible by 3

d)

Not Divisible by 6

74.
Loop statements are:
a)
Selection Statements
b)
Iteration Statements
75.

Which of the following control structure are needed to repeat a code?

a)

sequence

b)

loop

c)

selection

d)

if

76.

This loop can only be used when the programmer knows the number of times a code is to be repeated

a)

while

b)

for

c)

do while

d)

repeat until

77.

Which of these is NOT a loop in python?

a)

for loop

b)

while loop

c)

nested loop

d)

if loop

78.

Which of these operators means EQUAL TO?

a)

'='

b)

'=>'

c)

'<='

d)

'=='

79.

Which of these will allow me to count from 0-20 in steps of 5?

a)

for x in range(0,20):

print(x)

b)

while x = (0,20,5):

print(x)

c)

for x in range(0,21,5):

print(x)

d)

for x in range(0,21,5):

print(y)

80.

If i want to continuously check for a correct answer, what loop would i use?

a)

for loop

b)

while loop

81.

What is a Count-Controlled loop?

a)

for loop

b)

while loop

82.

Which kind of loop would be used?


I need a guessing game program that will let me keep guessing until I get the right answer.

a)

FOR Loop

b)

WHILE Loop

83.

Which kind of loop would be used?


I need a program that will keep letting me add money to a piggy bank until I get to £100.

a)

FOR Loop

b)

WHILE Loop

84.

WHILE loops are

a)

loops which run an unknown number of times

b)

loops which run for a specific number of times

c)

the same as if statements

d)

not part of programming

85.
Which of the following symbols is used in Python to mean "Not equal to"?
a)
==
b)
!=
c)
<>
d)
><
86.
Which of the following symbols is used in Python to mean "Greater than or equal to"?
a)
<=
b)
>>
c)
>=
d)
=>
87.
Which of the following symbols is used in Python to mean "Less than or equal to"?
a)
<<
b)
=<
c)
<=
d)
!=
88.

In a while loop the minimum time a code will be executed is

a)

Once

b)

Twice

c)

0

89.

In a While loop a code will be repeated until the condition becomes

a)

FALSE

b)

TRUE

c)

User choice

90.

WHILE loops are

a)

loops which run an unknown number of times

b)

loops which run for a specific number of times

c)

the same as if statements

d)

not part of programming

91.

Input statement

a)

Outputs a message on the screen

b)

Gets data from the user

c)

A decision

d)

A loop controlled by a decision

92.

Print statement

a)

Outputs a message on the screen

b)

Gets data from the user

c)

A decision

d)

A loop controlled by a decision

93.
Which of the following is not a data type?
a)
Number
b)
Text
c)
Word
d)
Desk
94.
Variables and constants in programs need to be assigned a data type.
a)
True
b)
False
95.
What data type would be best to record the exact length of a piece of string in meters?
a)
Real
b)
Boolean
c)
Decimal
d)
Integer
96.
Data types of variables can never be changed.
a)
False
b)
True
97.
What data type would be best used to record an email address?
a)
String
b)
Integer
c)
Real
d)
Character
98.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'A' be?

a)

1

b)

3

c)

5

d)

7

99.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'B' be?

a)

1

b)

3

c)

5

d)

7

100.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'C' be?

a)

1

b)

3

c)

8

d)

13

101.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'D' be?

a)

11

b)

13

c)

8

d)

1

102.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'E' be?

a)

3

b)

5

c)

8

d)

13

103.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'F' be?

a)

5

b)

8

c)

13

d)

18

104.

Tests are planned before starting to code

a)

True

b)

False

105.

Only valid data inputs are tested

a)

True

b)

False

106.

I am data which is in the expected 'normal' range

a)

Invalid

b)

Boundary

c)

Valid

107.

I am data which is would not be accepted in my program

a)

Invalid

b)

Boundary

c)

Valid

108.

I am data which checks a range of acceptable inputs, including at the start and end

a)

Invalid

b)

Boundary

c)

Valid