# Calculate and print the factorial of a given integer. # For example, if n = 30, we calculate 30 x 29 x 28 x ... x 2 x 1 and get 265252859812191058636308480000000 ...
This Python script defines a function factorial(n) that calculates the factorial of a number n using a recursion method. It tests the function with the number 5.
Understand how to translate mathematical problems into code. Implement algorithms for solving equations, optimization, and simulations. Debug and analyze code output for mathematical correctness.