Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ventsislav-Yordanov/8b7e47cda7b63bf97cfa5c80f05f50b3 to your computer and use it in GitHub Desktop.
Save Ventsislav-Yordanov/8b7e47cda7b63bf97cfa5c80f05f50b3 to your computer and use it in GitHub Desktop.
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