Why do we use pseudo-code to document an algorithm, rather than a natural language like English or a programming language like Python?
Pseudo-code is more precise than natural language, and yet easier for beginners to understand than a programming language.
Carefully trace the following algorithm. What does it output? Be sure to mark a section of your answer as the output, separate from your scratch work.
1. Let N be 8
2. Set I to 1
3. If I > N then stop.
4. If I < 4 or I is odd, then output I
5. Set I to I+1
6. Go back to step 3.
Tracing pseudo-code from Christopher League on Vimeo.
Give an example of each kind of pseudo-code instruction. Refer to the relevant step numbers in the algorithm above.