- Defines a function named factorial that takes a number as an argument and calculates its factorial using a loop or recursion.
- Returns the calculated factorial.
- Calls the function with a sample number and prints the output.
Asks the user for a number as input. 2. Uses the math module to calculate the: o Square root of the number o Natural logarithm (log base e) of the number o Sine of the number (in radians) 3. Displays the calculated results
output
