Use of recursion for repetitive algorithms in Python

--Originally published at Ed_Alita

The term recurssion is simple it means the use of a repetive funtion inside the funtion. Let’s see if we want to do the factorial funtion we are going to encounter to case the case of factorial 0 and the other cases. Having this in mind we have to make these two in code.

Therefore the code is the next one:

recrussion1

The result is the next one:

recrussion2

This is easy only having in mind that we are having ti use the same funtion between the repetitive one.

You can check these link for more information.

http://stackoverflow.com/questions/479343/how-can-i-build-a-recursive-function-in-python