Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
numbers = [23, 57, 10, 10, 12, 35, 2, 74, 302, 10]
# Repalce the "None" values with your solutions
# Use NumPy to calculate the values for each variable
mean = None
median = None
standard_deivation = None
sorted_numbers = None
numbers_sum = None
# Tests
nose.tools.assert_equal(53.5, mean)
nose.tools.assert_equal(17.5, median)
nose.tools.assert_almost_equal(85.737, standard_deivation, delta = 0.01)
nose.tools.assert_sequence_equal([2, 10, 10, 10, 12, 23, 35, 57, 74, 302], sorted_numbers.tolist())
nose.tools.assert_equal(535, numbers_sum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment