Hi @rkgames ,
Your message could be produced by first submitting code that assigned an
int to the name,
range, for example, as follows ...
range = 5
... and then by deleting that statement, and submitting the same code that you posted.
As a result, the console appears as follows ...
Traceback (most recent call last):
File "python", line 5, in <module>
TypeError: 'int' object is not callable
The reason for the error is that the original line of code redefined the name,
range, so that it no longer referred to the built in function,
range. When your code attempted to call the function, it appeared to the Python interpreter that it was trying to call an
int, as if it were a function.
To prevent this sort of problem, never use the name of a built in function or type as the name of a variable.
Also, when you remove names from your code on Codecademy, you should submit to make sure that your new code gets saved, then refresh the page, and submit again to see the result. The page refresh will purge Codecademy's memory of names that are no longer used in your code.