for x in range(1.11):
print ('Number: {0:2d} Square: {1:3d} Cube: {2:4d}'.format(x, x*x, x*x*x))
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
for x in range(1.11):
TypeError: 'float' object cannot be interpreted as an integer
问问题
28 次