- A function
fact(n)
calculates the factorial of a number using a loop. - Example:
fact(5)
gives120
.
- Asks the user to enter a number.
- Calculates:
- Square root of the number
- Natural logarithm (log base e)
- Sine of the number in radians
- Uses the Python
math
module.