What is Recursion?
It's a type of program where you get a subroutine to call itself. Recursion Helps to Solve problems more humanly, some mathematical problems can be better solved using recursion.
A Small Example:
def reverse(value):
if value <= 0:
print("Done!")
return
else:
for i in range(value):
print("๐ก", end = "")
print()
reverse(value - 2)
reverse(10)
Output:
๐ก๐ก๐ก๐ก๐ก๐ก๐ก๐ก๐ก๐ก
๐ก๐ก๐ก๐ก๐ก๐ก๐ก๐ก
๐ก๐ก๐ก๐ก๐ก๐ก
๐ก๐ก๐ก๐ก
๐ก๐ก
Today is 57 / 100 days in my Python Journey, Please feel free to join here : https://join.replit.com/python
See You Tomorrow...
ย