Repeating things usually

hana jarraya
1 min readJun 11, 2021

Hey little child! I will tell you about routine. Actually we do same things every day such as waking up and washing our face and teeth.

So the morning routine is repeated every day. So this habit is stopped only when we die. Hence this process is the recursive habits in our life. Since you are child you know for sure the addition of numbers in math. Let’s take an other example wwe want to add the numbers from 0 to 5. So we will start the addition of 0+1=1 than 1+2 than 2+3 than 3+5 than 4+8 than 5+12, 17 at the end. So what we did is every time we jump with 1 step and we add the previous sum and we stop when we jump to 5.

So I hope that these examples are clear to explain the recursion. If you get it try to do the multiplication of all the numbers from 1 to 5. In this way you garantie that you will get the concept. Also you can find an example of the function factorial of 5 in the picture below.

--

--