Computation, Input, and Output
3 Basic Sequential Operations in pseudocode
Input and Output
What communicates with the outside world pertaining to Sequential Operations
If/than/else
the most common conditional statement
Loop
repetition of a block of instructions
Finite Loop
The loop repeats the instructions until the continuation condition is false, where the loop terminates
infinite loop
A loop in which the terminating condition is never satisfied, and the loop repeats forever
natural language
a complex, but structured language, both written and spoken, that has evolved naturally in humans through use, repetition, and adaptation.
What algorithms can construct
Searching lists, finding maxima and minima, and pattern matching
Pseudocode
A set of English language constructs designed to more or less resemble statements in a programming language but that do not actually run on a computer
Sequential Flow Control in an Algorithm
The algorithm goes from top to bottom (top-down design)
Input 2. Computation 3. Output
How does sequential algorithm execute its instructions
High level instructions
Complex instructions composed of many primitives that allow abstraction to occur and can let the programmer focus on other parts of the algorithm
What notation should be used to express algorithms so that they're clear, precise, and unambiguous
What should be considered during the initial phase of design
Abstraction
The separation of the high-level view of an entity from the low-level details of its implementation
pretest loop
a loop whose condition is evaluated before the instructions in its loop body are processed (While/Do statement)
posttest loop
a loop whose condition is evaluated after the instructions in its loop body are processed (Do/While Loop)
Variable
a named storage location that can hold a data value.
High-level programming languages
What kind of languages are Java and C++
Sequential algorithm
An algorithm that executes its operations in a straight line, from top to bottom, without any branching (Straight-line algorithm)
Library
A collection of useful prewritten algorithms that can be used during problem solving
Control operation
Conditional and iterative statements, allow us to alter the normal sequential flow of control in an algorithm
If the continuation condition never becomes false
When can an algorithm fall into an infinite loop
Top-down design
viewing an operation at a high level of abstraction and fleshing out the details of its implementation at a later time
conditional statement
What type of loop is an if/than/else
Counter loop
a loop that uses a counter variable to process the loop instructions a precise number of times
Pattern matching
Process of searching for a special pattern of symbols within a larger collection of information