houndci / hound

Automated code review for GitHub pull requests.
https://houndci.com
MIT License
1.95k stars 402 forks source link

Implement Factorial Calculator in Python #1877

Closed OmprakashGujji closed 6 months ago

OmprakashGujji commented 6 months ago

This Python script implements a factorial calculator, allowing users to input a non-negative integer and calculate its factorial. The factorial of a non-negative integer n, denoted as n!, is the product of all positive integers less than or equal to n.

The script includes a function calculate_factorial that takes an integer input and returns the factorial value. It also performs input validation to ensure that the input is a non-negative integer.

Users can use this script to efficiently compute factorials for various mathematical and computational tasks.