I did the python introduction for the data science course without having access to the server…what was I thinking? I’m doing it again and now I run into the bug
TypeError: 'int' object is not callable already in exercise 2
a_value = 15
a_result = (25-7) * 17
TypeErrorTraceback (most recent call last)
<ipython-input-1-dd853d54f38f> in <module>()
1 a_value = 15
2 a_result = (25-7) * 17
----> 3 print(a_value)
5 print(a_value+ a_result)
TypeError: 'int' object is not callable
???can someone help, it’s frustrating to have a problem like this already in the beginning…
Make sure your computer is connected to the virtual machine. There is no issue with the code.
If there is a yellow sign at the top right corner, you are not connected to the virtual machine. There should be a green sign.
The code is all right.
@Zubair thanks a lot
keep having the same problem also with other parts of the course, in situations where the code seems correct.
I refresh and refresh and keep seeing myself in the same situation which is driving me nuts…
have a great day
The problem is the same that I explained here and I’ll explain here again, albeit in less detail.
You assigned a number to
print in the previous screen, this overrode the built-in
Now you’re trying to use the built-in function, but it’s not there anymore, it’s a number now, an integer to be more precise. So it is telling you that the
int object that
print currently is isn’t callable, because numbers aren’t callable.
To be clear, this isn’t a Dataquest platform issue per se, the same would have happened in your local Python.
A couple of ways to solve this issue are explained here. Let me know if you have trouble implementing them.
@pinheiro003 I might be wrong, follow the solution given by @Bruno.