[英]I am having trouble in computing a simple arithmetic using python
I want to compute this simple arithmetic problem: [6/2(1+2)] But it keeps giving me this error: [TypeError: 'int' object is not callable] no matter what method I try to use.我想计算这个简单的算术问题: [6/2(1+2)]但它总是给我这个错误: [TypeError: 'int' object is not callable]无论我尝试使用什么方法。 What should I do?我应该怎么办?
You missed *
character between 2 and parenthesis.您错过了 2 和括号之间的*
字符。 The way you wrote is, is like you'd call a function ie func()
您编写的方式就像您调用 function 即func()
You need to use * operator to multiply.您需要使用 * 运算符进行乘法运算。
Try this:尝试这个:
(6/2*(1+2))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.