15 questions
What is an algorithm?
A flowchart
Step by step instructions used to solve a problem
A decision
A flowchart or pseudocode
What are the three algorithm constructs?
Sequence, Selection, Iteration
Input, Process, Output
Input/output, decision, terminator
Loop, input/output, process
What is the difference between a flowchart and pseudocode?
A flowchart is diagrammatic whilst pseudocode is written in a programming language
A flowchart is textual but pseudocode is diagrammatic
A flowchart is a diagrammatic description of an algorithm whilst pseudocode is a textual description of an algorithm
A flowchart and pseudocode are the same thing
In a flowchart an input or output instruction is represented by:
A rectangle
A rhombus
A parallelogram
A circle
In a flowchart a calculation (process) is represented by:
A rectangle
A rhombus
A parallelogram
A circle
In a flowchart a decision (selection) is represented by:
A rectangle
A rhombus
A parallelogram
A circle
An algorithm asks a user to enter their age, the age is read into the system and the system outputs a 'Thank You' message.
This is an example of which of the algorithm construct?
Decision (Selection)
Loop (Iteration)
Order (Sequence)
All of the above
An Algorithm asks the user to enter their scores for 5 different tests.
This is an example of which of the algorithm constructs?
Decision (Selection)
Loop (Iteration)
Order (Sequence)
All of the above
An Algorithm asks the user to enter their gender (M or F) and prints out a different comment depending on what they entered.
This is an example of which of the algorithm constructs?
Decision (Selection)
Loop (Iteration)
Order (Sequence)
All of the above
What is a "Variable" ?
A value that can be changed and manipulated as an algorithm is running
A value that cannot be changed and manipulated as an algorithm is running
Variables are assigned an identifier/name. The identifier should be:
not too long
have a sensible name
not start with a number
not start with a capital letter
all of the above
firstName is and example of what commonly used way to name a variable
camelcase
snakecase
linecase
hillcase
first_name is and example of what commonly used way to name a variable
camelcase
snakecase
linecase
hillcase
This an example of:
a nested if
a combined if
a multiple if
a sequence if
Case statements can be used in some languages instead of:
a nested if
a combined if
a multiple if
a sequence if