Skip to content

Updated recursion.md with example #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 31, 2024
Merged

Updated recursion.md with example #679

merged 4 commits into from
May 31, 2024

Conversation

srilekha279
Copy link
Contributor

@srilekha279 srilekha279 commented May 29, 2024

PR Description

An example about how recursion works is included taking the function factorial as example.

Related Issues

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR

Undertaking

I declare that:

  1. The content I am submitting is original and has not been plagiarized.
  2. No portion of the work has been copied from any other source without proper attribution.
  3. The work has been checked for plagiarism, and I assure its authenticity.

I understand that any violation of this undertaking may have legal consequences that I will bear and could result in the withdrawal of any recognition associated with the work.

  • I Agree

srilekha279 and others added 4 commits May 25, 2024 21:17
… with simple python program

This commit updates the recursion explanation in the recursion.md file to be more beginner-friendly and comprehensive. The factorial example has been revised with n = 4 and stack variables have been included for each recursive call to demonstrate how functions are called and how values are returned. These changes aim to provide a clearer understanding of recursion, especially for beginners, by illustrating the step-by-step process of function calls and return values.
@animator animator merged commit a2e04ff into animator:main May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add content to recursion.md
2 participants