Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator

Tell us what’s happening:

raceback (most recent call last):
File “/home/runner/boilerplate-mean-variance-standard-deviation-calculator/test_module.py”, line 10, in test_calculate
self.assertAlmostEqual(actual, expected, “Expected different output when calling ‘calculate()’ with ‘[2,6,2,8,4,0,1,5,7]’”)
File “/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/unittest/case.py”, line 943, in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: ‘dict’ and ‘dict’

how can I fix this error for my calculator? Its

Describe your issue in detail here.

Your project link(s)

solution: boilerplate-mean-variance-standard-deviation-calculator - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Challenge: Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator

Link to the challenge:

This is a common error (search of the forums will provide further details) and indicates that your returned dictionary either has misspelled keys (it does) or incorrect value types (it does). The tests display an example of what you return at the beginning of the tests, so compare that very closely with the specification to see where the problems are.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.