我目前正在学习 Python,所以我不知道发生了什么。
import random
x=10
while x>0:
print(x+'='+(random.randint(1,100)))
x-=1
当我运行程序时
Traceback (most recent call last):
File "C:\Users\black\.spyder-py3\temp.py", line 12, in <module>
print(x+'='+(random.randint(1,100)))
TypeError: unsupported operand type(s) for +: 'int' and 'str'
偶然的你
相关分类