This respository contains the python codes for Assignment 3: Functions & Modules in Python
- 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.
for example, if the function is called with 5, it should return
Enter a number: 5 Factorial of 5 is: 120
- Asks the user for a number as input.
- 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)
- Displays the calculated results.
For example, if the user enters 25, the output should be:
Enter a number: 25 Square root: .50 logarithm: 3.2188758248682006 sine: -0.13235175009777303