diff --git a/samplemath.py b/samplemath.py new file mode 100644 index 0000000..ae91f3b --- /dev/null +++ b/samplemath.py @@ -0,0 +1,46 @@ +import math + +'''Log to the base e''' +print(math.log(10)) + +'''Log to the base 2''' +print(math.log2(16)) + +'''Log to the base 10''' +print(math.log10(10)) + +'''Power function''' +print(math.pow(2,5)) + +'''Find square root''' +print(math.sqrt(16)) + +'''Exponent to base e''' +print(math.exp(3)) + +'''Return the gcd of 2 numbers''' +print(math.gcd(10,14)) + + +'''Find sine''' +print(math.sin(10)) + +'''Find cosine''' +print(math.cos(6)) + +'''Find tangent''' +print(math.tan(5)) + +'''Convert angle x from radians to degrees''' +print(math.degrees(3.14)) + +'''Convert angle x from degrees to radians''' +print(math.radians(60)) + + +'''PI value''' +print(math.pi) + +'''E Value''' +print(math.e) +