这段代码有什么问题:
n = 10
((n/3)).is_integer()
我不明白为什么我不能设置n =任何数字并检查它是否是整数。
谢谢你的帮助!
python 2.7.4
错误:
Traceback (most recent call last):
File "/home/userh/Arbeitsfläche/übung.py", line 2, in <module>
print ((n/3)).is_integer()
AttributeError: 'int' object has no attribute 'is_integer'
慕尼黑8549860
翻阅古今
相关分类