-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Is there an existing issue for this?
- I have searched the existing issues
Issue Description
The current Python documentation is missing a chapter on Recursion in Python. Recursion is an important programming concept where a function calls itself to solve problems. Adding this chapter will help learners understand an advanced but essential concept in Python.
Suggested Change
Add a new documentation page titled “Recursion in Python” under the Python section.
The chapter should include:
-
Introduction to Recursion
- What is recursion?
- How it works with examples.
-
Recursive Function in Python
- Syntax and simple examples.
-
Base Case and Recursive Case
- Importance of stopping condition.
-
Examples
- Factorial of a number
- Fibonacci series
- Sum of digits
- GCD using recursion
-
Advantages and Disadvantages
- Cleaner code vs. memory usage/stack overflow.
-
Tail Recursion (Concept)
-
Practice Problems
Rationale
Recursion is a core computer science concept and widely used in problem solving (DSA, algorithms, coding interviews). Beginners often find it confusing, so having a proper documentation page with clear examples will:
- Help learners build a strong foundation in problem-solving.
- Complement the existing chapters like Functions in Python.
- Make the documentation more comprehensive.
This issue can be tagged with:
documentation
hacktoberfest
Urgency
High
Record
- I have read the Contributing Guidelines
- Are you a GSSOC'25 contributor
- I want to work on this issue
Metadata
Metadata
Assignees
Labels
Type
Projects
Status