Browse Source

Added square root functionality and one test for it

remotes/origin/feature/feature-fractions
fdai7783 11 months ago
committed by fdai7764
parent
commit
661744d99b
  1. 5
      src/main/py/logarithmic_and_expo_and_root_calculations.py
  2. 17
      src/test/py/logarithmic_ann_expo_and_root_calculations.py

5
src/main/py/logarithmic_and_expo_and_root_calculations.py

@ -0,0 +1,5 @@
import math
def sqr(first_number):
return math.sqrt(first_number)

17
src/test/py/logarithmic_ann_expo_and_root_calculations.py

@ -0,0 +1,17 @@
import unittest
from src.main.py.logarithmic_and_expo_and_root_calculations import *
class primitive_calculations(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_sqr_of_4_equals_2(self):
self.assertEqual(sqr(4), 2)
if __name__ == "__main__":
unittest.main()
Loading…
Cancel
Save