python中的int对象不可调用错误

python中的int对象不可调用错误,python,object,int,typeerror,Python,Object,Int,Typeerror,下面这段代码给了我错误 fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2))) Traceback (most recent call last): File "C:\Users\etc fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2)) TypeError: 'int' object is not callable 这就是错误所在 f

下面这段代码给了我错误

fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2)))
Traceback (most recent call last):
  File "C:\Users\etc
    fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2))
TypeError: 'int' object is not callable
这就是错误所在

fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2)))
Traceback (most recent call last):
  File "C:\Users\etc
    fd=((1/(sd*sqrt(6.28)))*2.718**((-1(d-average)**2))/(2*sd**2))
TypeError: 'int' object is not callable
我找不到int对象“不可调用”的位置


谢谢

您在-1之后缺少了
*
操作符。

这是由Python试图“调用”的int对象造成的,如下所示:

>>> 2*(1+3)
8
>>> 2(1+3)        #note missing *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>2*(1+3)
8.
>>>2(1+3)#注释缺失*
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
TypeError:“int”对象不可调用

那是因为这个表达式很可怕。使用一堆临时变量。(我猜你在paren之前的
-1(d-average)
处缺少一个运算符。)你的示例代码和错误消息没有相同的代码。我已经想到了这一点,但我的教授希望看到他给我们的代码中的确切等式。不管怎样,谢谢。但是同样的错误会出现。我会修复它。哦,好的,我现在看到了。。谢谢作为将来的参考,错误消息非常有用。
'int'对象不可调用
告诉您正在尝试执行类似()的操作。我只是在找一个int和parens发生冲突的地方。