Coding Exercise 2: degrees_of_freedom

I’m getting correct the values, but receive 0 points due to the following error:

Failed test case: return value of degrees_of_freedom has incorrect type.
Expected:
a numeric type,
but got:
<class ‘float’>.

Any ideas what I could’ve done wrong?

Sounds like your code is returning the wrong type of data.

Hi Maja_G,
I got the same problem with degrees of freedom exercise.
Actually, it is slightly different though. It said “There was a problem compiling the code from your notebook. Details: name ‘degrees_of_freedom’ is not defined”, but I was sure that it was defined.
Did you manage to overcome the problem?
Thanks
Huy

For those encountering the same issue, check out this native python function int(x).

Hi Huy, was this issue from exercise 2 or from later exercises?