January 2019
Beginner to intermediate
745 pages
21h 6m
English
Simple (atomic) variables are those that cannot be divided. They are a value stored in a place. We used simple variables in the algorithms in Chapter 6.
Suppose you want to write an algorithm to express what dress is appropriate for a given outside temperature. You would like to wear shorts if it is hot, short sleeves if it is nice but not too hot, a light jacket if the temperature is chilly, and a heavy coat if it is cold. If the temperature is below freezing, you stay inside.
The top-level (main) module just expresses the tasks.
The first two statements do not need further decomposing. However, Determine ...
Read now
Unlock full access