TypeError:'int'对象不可调用python

时间:2015-09-09 11:26:58

标签: python python-3.x

我想要一个程序的帮助它在python中给出错误说TypeError:'int'对象不可调用。我想知道我做错了什么。提前致谢

from math import sqrt
from math import pi

ba = pi * 2( 2 + sqrt(3**2 + 2**2)))

print (ka)

1 个答案:

答案 0 :(得分:2)

如果你写

if (ModelState.IsValid && !displayNameExist)
{   
     //Save 
     //return RedirectToAction(your action)
     //return Redirect(your redirect url)
}
else
{
     ModelState.AddModelError("DisplayName", "DisplayName already exists.");
     //If you need add something to ViewBag you can do it here
     return View();
}

它不起作用。解释器认为您正在尝试调用名为2(...) 的函数。

如果您的意思是乘法,请使用2,python运算符进行乘法运算。

*