The algorithm is the basis for programming. The lack of mastery of the algorithm makes you a bad programmer. In the same way, the one who masters the algorithm is necessarily a good programmer. This article is intended for beginners in programming. In this article I explain what programming is and how it relates to programming.
An algorithm is a set of instructions following a logic to perform a given task. Tasks such as preparing an omelette, solving an equation or crossing a road, for example. Yes, you do the algorithm every day without knowing it. Let's take the example of preparing an omelette. To do this, we follow the following instructions:
- Break the eggs
- Beat the eggs to incorporate the yolk and egg white well
- Heat an oil pan
- Add the mixture to the oil
- Turn the omelette over
- Serve the omelette
Any algorithm produces a result, allows to solve a given task.
FRom the Algorith to the program
When we program, we write, algorithm, but in a language called programming language, called (algorithm) code. This code allows us to obtain a program that we generally call an application that will run on computers or calculators for example.
The algorithm is written according to a given syntax and its own structure that I will talk about in the next video.