Skip to content

pravallika-mutyala/python-Assignment3-module4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python Programs: Factorial and Math Calculations

Task 1: Factorial Using a Function

  • This program asks the user to enter a number.
  • It calculates the factorial using a function and prints the result.

Example Output:

Enter a number: 5 Factorial of 5 is : 120

Task 2: Math Calculations Using math Module

  • This program asks the user to enter a number.
  • It uses the math module to calculate:
    • Square root
    • Natural logarithm
    • Sine (in radians)

Example Output:

Enter a number: 25 Square root: 5.0 Logarithm: 3.2188758248682006 Sine: -0.13235175009777303


How to Run

  1. Make sure Python is installed.
  2. Save the code in .py files (example: factorial-using-func.py, math-module.py).
  3. Run the files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages