Skip to content

yaitoolbox/Python_Assignment_3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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 AND recursion.
  2. Returns the calculated factorial.
  3. Calls the function with a sample number and prints the output.

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.

About

Function and Math Module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages