コード例 #1
0
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 test_MathOperations_Addition(self):
     self.assertEqual(5, Addition.addition(1, 4))
コード例 #3
0
 def test_MathOperations_sum_list(self):
     valueList = [1, 2, 3]
     self.assertEqual(6, Addition.addition(valueList))
コード例 #4
0
 def Sum(self, a, b):
     self.Result = Addition.addition(a, b)
     return self.Result