我目前正在學(xué)習(xí) Python,所以我不知道發(fā)生了什么。import randomx=10while x>0: print(x+'='+(random.randint(1,100))) x-=1當(dāng)我運(yùn)行程序時(shí)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'
為什么print總是報(bào)錯(cuò)不支持str和int連接?print有什么用?
慕蓋茨4494581
2023-06-13 16:57:38