**My code run well on PyCharm but when i try to run on replit.com, it showed me an error.**

It showed me this:

```
======================================================================
ERROR: test_calculate (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-mean-variance-standard-deviation-calculator-1/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 "/usr/lib/python3.8/unittest/case.py", line 943, in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: 'dict' and 'dict'
======================================================================
ERROR: test_calculate2 (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-mean-variance-standard-deviation-calculator-1/test_module.py", line 15, in test_calculate2
self.assertAlmostEqual(actual, expected, "Expected different output when calling 'calculate()' with '[9,1,5,3,3,3,2,9,0]'")
File "/usr/lib/python3.8/unittest/case.py", line 943, in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: 'dict' and 'dict'
----------------------------------------------------------------------
```

**This is my code.**

ps. Sorry for ugliness of my code.

```
import numpy as np
def calculate(list):
if len(list) != 9:
raise ValueError("List must contain nine numbers.")
x = np.array(list)
calculations = {
'mean': [[],[],0],
'variance': [[],[],0],
'standard deviation': [[],[],0],
'max': [[],[],0],
'min': [[],[],0],
'sum': [[],[],0]
}
matrix = x.reshape(3,3)
for i in range(3):
calculations['mean'][0].append(np.mean(matrix[0::, i:i+1]).tolist())
calculations['variance'][0].append(np.var(matrix[0::, i:i+1]).tolist())
calculations['standard deviation'][0].append(np.std(matrix[0::, i:i+1]).tolist())
calculations['max'][0].append(np.max(matrix[0::, i:i+1]).tolist())
calculations['min'][0].append(np.min(matrix[0::, i:i+1]).tolist())
calculations['sum'][0].append(np.sum(matrix[0::, i:i+1]).tolist())
for i in range(3):
calculations['mean'][1].append(np.mean(matrix[i]).tolist())
calculations['variance'][1].append(np.var(matrix[i]).tolist())
calculations['standard deviation'][0].append(np.std(matrix[i]).tolist())
calculations['max'][1].append(np.max(matrix[i]).tolist())
calculations['min'][1].append(np.min(matrix[i]).tolist())
calculations['sum'][1].append(np.sum(matrix[i]).tolist())
calculations['mean'][2] = np.mean(x).tolist()
calculations['variance'][2] = np.var(x).tolist()
calculations['standard deviation'][2] = np.std(x).tolist()
calculations['max'][2] = np.max(x).tolist()
calculations['min'][2] = np.min(x).tolist()
calculations['sum'][2] = np.sum(x).tolist()
return calculations
```

Can anyone help me? I try to search in stackoverflow, but i still donâ€™t seethe answer.

.

.

If you enter this post, i just want to say â€śThank youâ€ť for your kindness.

Good luck.

**Challenge:** Mean-Variance-Standard Deviation Calculator

**Link to the challenge:**