1.1 Algorithms Flashcards
Unambiguous.
tis means that the instructions cannot be misunderstood. simply saying ‘turn’ would be ambiguous because you could turn left or right.
All instructions given to the computer should be unambiguous or it wont know what to do.
Sequence.
An ordered set of instructions.
Algorithms.
A precise method of problem solving .
High-Level programming language.
A programming language that resembles natural human language .
Flowchart
A graphical representation of an algorithm. Each step in the algorithm is represented by a symbol. Symbols are linked together with arrows showing the order in which steps are executed.
Pseudo-code.
A structured, code like language that can be used to describe an algorithm.
Variable.
A ‘container’ used to store data. The data stored in a variable is referred ta as a value. the value stored in a variable is not fixed. the same variable can store different values during the course of a program and each time a program is run
Identifier.
A unique name given to a variable or a constant. using descriptive names for variables makes code much easier to read.
Arithmetic operator.
A operator that performs a calculation on two numbers .
Constant
A container that holds a value that never changes. like variables constants have unique identifiers.
construct
a component from which something is built. letters and numbers (i.e. a to z and zero to nine) are the constructs we use to build our language and convey meaning. bricks and cement are the basic constructs of a building.
Selection
a construct that allows a choice to be made different alternatives.
iteration
a construct that means the repetition of a process. An action is repeated there is a desired outcome or a condition is met. it is often referred to as a loop.
IF…THEN…ELSE statement.
The IF…THEN…ELSE statement allows a choice to be made between two alternatives based on weather or not a condition is met.
Relational operator
An operator that conducts two main values