Interview Query

Compute Variance

1
Have you seen this question before?

Write a function that outputs the (sample) variance given a list of integers.

Note: round the result to 2 decimal places.

Example:

Input:

test_list = [6, 7, 3, 9, 10, 15]

Output:

get_variance(test_list) -> 13.89
Next question: Cumulative Reset
.....
Python 3.9.6
Loading editor
Use Shift + Enter to run code