gpt4 book ai didi

python - 我无法弄清楚的代码错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:02:18 24 4
gpt4 key购买 nike

<分区>

代码:

current = input (" Now subtract it by 1. Uh-Oh, My calculator is broken, please tell me what the difference is.")
current = int(current)

print (" OK, my calulator is up and running. We must multiply the number with 13. Its alright, I have the answer here.")
print (current*13 + " is the product")

错误信息:

Traceback (most recent call last):
File "/home/pi/Desktop/birthday trick.py", line 13, in <module>
print (current*13 + " is the product")
TypeError: unsupported operand type(s) for +: 'int' and 'str'

请告诉我如何改进我的代码。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com