Skip to content

Conversation

@Tejasrahane
Copy link
Contributor

Describe your change:

Fixed incorrect doctests in the factorial_recursive() function. The doctests were calling factorial() instead of factorial_recursive(), which means they were testing the wrong function.

Changes made:

  • Line 44: Changed all(factorial(i) to all(factorial_recursive(i)
  • Line 46: Changed factorial(0.1) to factorial_recursive(0.1)
  • Line 50: Changed factorial(-1) to factorial_recursive(-1)

This fix ensures that the doctests correctly validate the factorial_recursive function itself.

  • Fix a bug or typo in an existing algorithm

Checklist:

  • I have read CONTRIBUTING.md
  • This pull request is all my own work -- I have not plagiarized
  • 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

The doctests in factorial_recursive were calling factorial() instead of factorial_recursive(). This fix ensures that the tests correctly validate the factorial_recursive function itself.
@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Oct 23, 2025
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 enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant