Unit 1 - Fundamentals of algorithms Flashcards
Define the term “algorithm”
An algorithm is a sequence of steps that can be followed to complete a task; for example, a computer program
Define the term “decomposition”
Decomposition is the breaking down of a problem into smaller sub-problems which can be broken down further until each small task is manageable
State the advantages of decomposition
Advantages of decomposition are:
* The problem becomes easier to solve when it consists of a number of small modules
* Some modules can be reused in other programs which saves development time
Define the term “abstraction”
Abstraction is the process of removing unnecessary detail from a problem so that you can focus on the essential components
Define the term “variable”
A variable is a location in memory where you can temporarily store a value such as a string
Define the terms “sequence”, “selection”, and “iteration”
- Sequence - a series of steps which are completed one after the other
- Selection - the ability to choose different paths through a program
- Iteration - repeating a part of the program
What is this flowchart symbol?
Start/End - this begins and ends all flowcharts - the shape is called a terminator
What is this flowchart symbol?
Arrow - this shows the relationship between the representative shapes
What is this flowchart symbol?
Input/Output - this either asks the user to input information or displays information
What is this flowchart symbol?
Process - maths operations and assignment of variables
What is this flowchart symbol?
Decision - changes the flow of the program based on a decision
What is this flowchart symbol?
Subroutine - calls a different function or procedure
What is an “integer”?
An integer is a whole number
What is a “real”?
Also known as a “float”
A real is a number with a decimal point
What is a “boolean”?
A boolean is something which can only be true or false