WorksheetsY8 Algorithm Design
Total questions: 20
Worksheet time: 12mins
Which method for representing an algorithm is the most visual?
Pseudocode
Flow Chart
Sentences
What is an algorithm?
A type of computer code
A set of computer instructions
A set of instructions to solve a problem
A list of tasks
In flow charts, which shape is used to represent an INPUT/OUTPUT?
Rectangle
Diamond
Rounded Rectangle
Parallelogram
What data type is the following an example of?
"Hello Year 9 students"
Integer
String
Real
Boolean
The char data type stores...
a single number
a single letter
a single special character
any single character
Boolean data type is used to store a true or false value only.
True
False
What are loops used for?
To prevent lines of code being repeated
To repeat a sequence of code as many times as the user wishes
To repeat a sequence of code for a certain number of times
To provide a sub routine within a program
A WHILE loop...
repeats a sequence of code while a condition is false
repeats a sequence of code while a condition is true
repeats a sequence of code if a condition is true
repeats a sequence of code if a condition is false
What does the following algorithm do?
START
count <- 0
Repeat
OUTPUT count
count <- count +1
Unit count = 10
END
Counts down from 10 to 0
Counts up from 0 to 10
Counts from 0 to 10 in twos
Counts up from 0 to 10 with 1 second between each output
What does this flow chart do?
Adds a life when the player touches the ground
Removes a life when the player touches an enemy
Removes 2 lives when the player touches the ground
Removes a life when the player touches the ground
Misspelling a variable name is an example of what type of error?
Syntax Error
Logic Error
Runtime Error
No Error
When an algorithm works but produces different results from what you designed or expected, which type of error is this?
Syntax Error
Logic Error
Runtime Error
No Error
When a program is asked to do something that it cannot, the program may ‘crash’. Which type of error is this?
Syntax Error
Logic Error
Runtime Error
No Error
What do we call a program within a program that can be called multiple times?
A mini program
A loop
A subroutine
A call program
Which of the following statements are true for a decision component of an algorithm?
Uses a rectangle shape in a flow chart
Gives 3 possible outputs
Is only used in flow charts
None of these
A selection requires a Boolean decision, which of the following outputs would be given for this expression: 10 * 2 > 20
True
Error
Equals
False
A sequence is...
a set of decisions made one at a time
a set of tasks executed one at a time
a set of tasks executed at the same time
a set of instructions to perform a specific task
In a flow chart, a task/process is represented using which shape?
Rectangle
Rounded rectangle
Diamond
Arrow
Which of the following Boolean operators represents less than or equals to?
>=
=>
<=
=<
Which of the following is also referred to as the counting loop?
WHILE
REPEAT UNTIL
IF THEN ELSE
