【发布时间】:2018-08-20 16:26:15
【问题描述】:
代码:
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'
请告诉我我可以做些什么来改进我的代码。
【问题讨论】: