You have written 14 codes by now. In each code you wrote something like
1. getting the user input
2. processing or validating the data. like if the user entered some string, you checked for it's length, then converted each lowercase char to it's uppercase value,
3. displayed the result.
The steps you wrote is nothing but algorithm.
Algorithm is simply a sequence of steps executed in order so as to get the desired results.
algorithm is powerful way to set in best possible way of anything .
for example :
google use their own algorithms to display searches .
when you'll start writing in search box "temp... "
google will show some searching hint like
" temperature " ,
"temperature in "your location" " ,
"temporary meaning" etc .
~ temp... = suggestion comes from dictionary
~temp... = suggestion comes from wikipedia
~ temp.. = possible word which uses most .
~ temp... = template near current location
~temp ... = temperature of your recent searched location .
dozens of possible result .
what can make a sence can write in code/program (for this example) is algorithm. so google have written almost possible thing or prediction in a systematic way .
you use few trick for particular thing in a systematic way is alo an algorithm.
It's a step by step procedure to solve a problem.
There is no specific rules for writing algorithm except some guidelines.
It is a logical way of solving a problem.
It helps you to create a program easily.
bunny an algorithm is are Ordered steps that solve a mathematical problem. A precise step-by-step plan for a computational procedure that possibly begins with an input value and yields an output value in a finite number of steps.
Well, I will explain you this, so that even a small kid would understand😉
Algorithm is like your day. First, you get up from your bed->
only then you take a shower ->
Have a breakfast/or not ->|
If the weather
is normal-> then you go to work
Else -> you stay at home and do what you want
If you understand this, it is easy to illustrate this situation in program. In role of 'you' would be a compiler that completes given tasks
___step by step___ untill the expected result😏
With simple words, algorithm is a process that do something. Algorithm is a total of steps which do something or solve something.
For example you want to climb a mountain. You wake up, you prepare your equipment, fill up your water bottles, eat something and you begin your road on the top of the cliff. This process is the algorithm.