@ -15,3 +15,7 @@ def logarithmize(first_number, second_number):
def logarithmize_dualis(first_number):
return math.log2(first_number)
def logarithmize_base_10(number):
return math.log10(number)
@ -21,6 +21,9 @@ class primitive_calculations(unittest.TestCase):
def test_4_ld_equals_2(self):
self.assertEqual(logarithmize_dualis(4), 2)
def test_10_log10_equals_1(self):
self.assertEqual(logarithmize_base_10(10), 1)
if __name__ == "__main__":
unittest.main()
xxxxxxxxxx
xxxxxxxxxx