The importance of sequences
One day, when you come home, you start craving a pie, so you decide to make one. The reason you will bake a pie is not that you wish to cook, but to satisfy your desire for pie. However, to be able to get the pie, you need to perform several steps. First, you need a recipe, and then you need to get all of the ingredients. When you acquire them, you will follow each step in the recipe. Then, finally, after the pie has been in the oven and cooled down a bit, you can enjoy your well-deserved treat.
You just performed a few tasks in sequence. Some of them need to be completed in the right order, while others can be done in any order (or, at least, in a more relaxed order). You must turn on the oven before you can bake the pie, but it is not essential that you bring out the flour before the butter.
Programming is like baking a pie. We will have goals, such as we want pie, and to be able to achieve that goal, we will need to do several things: in some...