Skip to content

Added factorial_recursive.py with doctests and descriptive parameter …#13805

Closed
Sourabhyadav09 wants to merge 2 commits intoTheAlgorithms:masterfrom
Sourabhyadav09:Sourabhyadav09-patch-3
Closed

Added factorial_recursive.py with doctests and descriptive parameter …#13805
Sourabhyadav09 wants to merge 2 commits intoTheAlgorithms:masterfrom
Sourabhyadav09:Sourabhyadav09-patch-3

Conversation

@Sourabhyadav09
Copy link

Factorial Recursive

Describe your change:

  • Add an algorithm
  • Fix a bug or typo in an existing algorithm
  • Add or change doctests
  • Documentation change

This pull request adds a new recursive algorithm implementation in Python. The implementation includes a short doctest and type hints so it passes automated checks. It is intended as a learning resource for beginners.

Checklist:

  • I have read https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file.
  • All new Python files are placed inside an existing directory (e.g., maths/).
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.

Example: Added factorial_recursive.py in the maths/ directory.
Reference: https://en.wikipedia.org/wiki/Recursion_(computer_science)

@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Oct 29, 2025
@MaximSmolskiy
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants