Your question is Compute Mean and Standard Deviation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
At Acme Analytics, you need a utility function that summarizes a list of numeric values. Write a function that returns the mean and population standard deviation of a list of numbers.
The mean is the sum of all values divided by the number of values. The population standard deviation is defined as sqrt(sum((x - mean)^2) / n).
nums of integers or floating-point numbers[mean, standard_deviation]If the input list is empty, return [0, 0].
def mean_and_stddev(nums):