Alterna · учебный материал

Algorithm blocks

Short theory of block diagram: order of action, choice and repetition.

Что в этом материале

Содержание и основные понятия

Read the diagram from the top down: the rectangle changes the data, the parallelograms receive or output them, the Romb chooses one branch. The arrow always answers the question "What to do next?"
algorithms
Block diagrams
Examination base
01
Three structures
Following
Commands go one after the other. For any entrance, the order is the same.
The branch
The Rom checks the condition. The true and false branches must be signed.
Cycle
One branch returns to the test, the other branch withdraws from the repeat.
The algorithm properties
Commands need to be clear to the performer, clear, and result in the final number of steps.
02
One route
Linear algorithm: value gets name, changes and releases.
Start
↓
Introduction
x
↓
Action
x ← x × 3
↓
Conclusion
x
↓
End
03
How to Check the Scheme
Write down the raw data.
Do exactly one block and renew your condition.
In the rumba, choose the branch on the result.
On the cycle, check that the data is approaching the stop.
Boundary
Check the value at the border itself and on both sides of it.

Structural map of textbooks