freeCodeCamp/CurriculumExpansion

Traceback (most recent call last): File "/home/runner/boilerplate-mean-variance-standard-deviation-calculator-1/test_module.py", line 18, in test_calculate_with_few_digits self.assertRaisesRegex(ValueError, "List must contain nine numbers.", mean_var_std.calculate, [2,6,2,8,4,0,1,]) AssertionError: ValueError not raised by calculate

Closed this issue · 1 comments

import numpy as np

def calculate(list):
if len(list) != 9:
return 'ValueError, '
x = np.array(list).reshape(3,3)
result = {
k:[func(x,axis=ax).tolist()
for ax in [0,1,None]]
for (k,func)
in zip(["mean", "variance", "standard deviation", "max", "min", "sum"],
[np.mean, np.var, np.std, np.max, np.min, np.sum])
}
return result

gikf commented

Thank you for reporting this issue.

This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "Get Help" button on the challenge on freeCodeCamp and choose the "Ask for help" option, which will help you create a question in the right part of the forum. Volunteers on the forum usually respond to questions within a few hours and can help determine if there is an issue with your code or the challenge's tests.

If the forum members determine there is nothing wrong with your code, you can request this issue to be reopened.

Thank you and happy coding.