Chapter 11: Algorithms Flashcards
Algorithm
A sequence of steps that can be carried out to perform a task
Structured English
A subset of English that consists of command statements used to describe an algorithm
Pseudocode
A way of using keyboards and identifiers to describe an algorithm without gollowing the syntax of a particular programming language
Flowchart
Shapes linked together to represent the sequential steps of an algorithm
4 basic constructs
- Assignment
- Sequence
- Selection
- Iteration
Assignment
- A value is given a name (identifier)
* The value given to an identifier is changed
Sequence
A number of steps are performed, one after the other
Selection
Under certain conditions some steps are performed.
Yes or No
Iteration
A sequence of steps is performed a number of times. Also known as looping.
Variables
A storage location for a data value that has an identifier
Identifier table
A table listing the variable identifiers required for the solution, with definitions.
Nested IF statements
An IF statement within an IF statement