Skip to content

📝[Docs]: add detail explain Recursion in Python #652

@codewithdhruba01

Description

@codewithdhruba01

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:

  1. Introduction to Recursion

    • What is recursion?
    • How it works with examples.
  2. Recursive Function in Python

    • Syntax and simple examples.
  3. Base Case and Recursive Case

    • Importance of stopping condition.
  4. Examples

    • Factorial of a number
    • Fibonacci series
    • Sum of digits
    • GCD using recursion
  5. Advantages and Disadvantages

    • Cleaner code vs. memory usage/stack overflow.
  6. Tail Recursion (Concept)

  7. 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

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions