Recursion simply involves a function calling its self.
The syntax is:
def myfunction():
..................
myfunction()
myfunction ()
Basically, we created a function and called it inside it's self before calling it again in the program.
What this does is carry out the function twice for everytime it's called once in the program.
No comments:
Post a Comment