A recursion allow a function to be written inside itself so it can run more than one time. The function would be running itself.
A lot of information about recursion states that knowing how to create a program that gets you the factorial number is an awesome begining to understand recursion.
The code would be like this.
def factorial(a):
if a == 1:
return 1
return (a*factorial(a-1))
We can see how at the last line the programm compute the function inside the function. The programm would do something like
5! = 4 * 3 * 2 * 1
and this will make it faster and more efficient
]]>Here is my video tutorial for the topic masterie 21
link: https://www.youtube.com/watch?v=5LPV4HEYlYQ&feature=youtu.be
]]>
Here is my video tutorial for the topic masterie 21
link: https:/
]]>