I don't get it, I tried to change the code in various ways but I still get: 'int' object is not callable or 'float' object is not callable errors
Although in PyCharm the code runs just fine. Does it have something to do with the Python version difference - cause Codeacademy is on Python 2.7, right - ?
Does anyone know where's the problem ?
def digit_sum(x): number = int(x) result = 0 while number != 0: result += number % 10 number /= 10 return result