-3
我是新来的Python的量计算器,我的问题是,当我想要计算立方体的体积计算器:使计算一个立方体
>>> print(int ** 3 (input ("Enter the side length: ")))
Enter the side length: 4
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
print(int ** 3 (input ("Enter the side length: ")))
TypeError: 'int' object is not callable
'int'不是Python中的一种类型。 Python是动态类型的,因此没有办法定义变量类型。 – ifconfig
'side_len = int(input('Enter side length:')); print('立方体的体积是:',side_len ** 3)' –