Adding Chpater 2 files (packages)

This commit is contained in:
muassif
2021-01-16 15:21:52 +04:00
committed by GitHub
parent d78cf1f8e9
commit fdea0fea98
21 changed files with 212 additions and 0 deletions
@@ -0,0 +1 @@
#empty
@@ -0,0 +1,14 @@
# advcalculator.py with sqrt,log and ln functions
import math
def sqrt(x):
"""This function takes square root of a number"""
return math.sqrt(x)
def log(x):
"""This function returns log of base 10"""
return math.log(x,10)
def ln(x):
"""This function returns log of base 2"""
return math.log(x,2)