Page 1 of 1

An algorithm is a sequence of steps designed to accomplish something. A good example of an algorithm is a recipe for yo

Posted: Fri May 20, 2022 5:13 pm
by answerhappygod
An algorithm is a sequence of steps designed to accomplish something. A good example of an algorithm is a recipe for your favorite food. It is not only important that all the steps be completed, but that they are completed in their intended sequence. Obviously, you wouldn’t add the frosting to a cake before it goes in the oven. There are two types of algorithms that we will consider in this course, top-down and bottom-up.
Most algorithms break down a process into smaller and smaller components. For example, baking a cake can be broken down into:
Each of these processes can be further broken down into sub-processes. For example, mixing the ingredients can be broken down into:
The process of breaking down each step continues until it is simplified and is easily understood. The term “easily understood” depends on your audience. The step, mixing ingredients, might be sufficient for a master chef. It will not be sufficient for someone from another planet.
For the purposes of this course, and computer programming in general, it is not necessary to break down any process beyond what would take a few lines of code to accomplish.
Exercises