Skip to content

aakashbhatt32/Python_Module-4_Functions_Modules-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Python_Module-4_Functions_Modules-in-Python

Module 4: Functions & Modules in Python (Assignment 3)

ASSIGNMENT 3: Module 4: Functions & Modules in Python Task 1: Calculate Factorial Using a Function

Problem Statement: Write a Python program that:

  1. Defines a function named factorial that takes a number as an argument and calculates its factorial using a loop or recursion.
  2. Returns the calculated factorial.
  3. Calls the function with a sample number and prints the output.

Expected Output: For example, if the function is called with 5, it should return:

Task 2: Using the Math Module for Calculations

Problem Statement: Write a Python program that:

  1. 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. Expected Output: For example, if the user enters 25, the output should be:

Submission Instructions: Create a GitHub repository and upload your Python scripts (.py files). Ensure the repository includes a README.md file that describes the functionality of your programs. Add both Task 1 and Task 2 scripts in the same repository. Submit the link to your GitHub repository once uploaded.

Reference: Follow the Python course - Module 4: Functions & Modules in Python for additional guidelines and examples.

Note: Please test your project thoroughly and check all the validations and error handling prior to ensure it works as expected before submission.

About

Module 4: Functions & Modules in Python (Assignment 3)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages