def Mean(data):
    num_values = len(data)
    total = 0
    for num in data:
        total = Addition.addition(total, num)
    return Division.divide(total, num_values)
Пример #2
0
 def zscore(sd, data):
     X = PickSeedList.pickSeed(sd, data)
     meanData = Mean.Mean(data)
     sd = StandardDeviation.standardDeviation(data)
     z = Division.divide(X - meanData, sd)
     return z
Пример #3
0
 def test_MathOperations_division(self):
     self.assertEqual(3, Division.divide(9, 3))
 def test_MathOperations_divide_list(self):
     dividend = 16
     divisor = 2
     result = Division.divide(dividend, divisor)
     self.assertEqual(8, result)
Пример #5
0
 def Division(self, a, b):
     self.Result = Division.divide(a, b)
     return self.Result