Standard deviation of a list
Question
Given a list of numbers, write a function to read in the list and calculate the standard deviation. Avoid using any built in library to calculate.
Examples:
std_dev([2, 4, 6, 8]) = 2.58199
std_dev([1]) = 'NaN'
Given a list of numbers, write a function to read in the list and calculate the standard deviation. Avoid using any built in library to calculate.
Examples:
std_dev([2, 4, 6, 8]) = 2.58199
std_dev([1]) = 'NaN'