import stats my_list = [4,1,5,7,6,8,9,10,8,3,3,8,12] mean = stats.mean(my_list) print('The mean is: ' + str(mean)) median = stats.median(my_list) print('The median is: ' + str(median)) range = stats.range(my_list) print('The range is: ' + str(range)) sum = stats.sum(my_list) print('The sum of all numbers is: ' + str(su
def testSingleRange(self): # passing only one data point must return zero self.assertEqual(stats.range([5]), 0)
def testNoRange(self): # passing two equal data points must return zero self.assertEqual(stats.range([5.3,5.3]), 0.0)
def testNoRange(self): # passing two equal data points must return zero self.assertEqual(stats.range([5.3, 5.3]), 0.0)