Python
Python copied to clipboard
Create factorial_iterative.py
Describe your change
- Add an algorithm
Created a new Python file factorial_iterative.py implementing the factorial function using an iterative approach. This algorithm was not present earlier. Included type hints and a Wikipedia reference as required.
Checklist
- [x] I have read CONTRIBUTING.md
- [x] This pull request is all my own work and I have not plagiarized.
- [x] I know this PR will not be merged if it fails the automated tests.
- [x] This PR only changes one algorithm file.
- [x] All new Python files are placed inside an existing directory.
- [x] All filenames are in all lowercase with no spaces or dashes.
- [x] All functions and variable names follow Python naming conventions.
- [x] All function parameters and return values are annotated with type hints.
- [x] All functions have doctrings and pass automated testing.
- [x] Includes at least one URL reference to explanation.