Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
希望你们都平安。我只想得到 (20^5)-(1^5)/5(20-1)
myNum = ((20**5)-(1**5))/5(20-1) print(myNum)
我拿了TypeError: 'int' object is not callable 然后我把它改了;
print(((20**5)-(1**5))/5(20-1))
但我仍然遇到同样的错误。我检查了解决方案,但不明白我必须做什么。
使固定:((20**5)-(1**5))/5/(20-1)
((20**5)-(1**5))/5/(20-1)
错误是你不能在这里省略乘号:5(20-1)。
5(20-1)
解释器认为您正在尝试调用类似的函数f(...),但5不是函数,这就是您看到错误的原因:
f(...)
5
TypeError: 'int' object is not callable ^^^ ^^^^^^^^ 5 (20-1)