Я кодирую калькулятор, и когда я запустил программу, появилось это сообщение об ошибке:
Traceback (most recent call last):
File "/Users/sergioley-languren/Documents/itt/independent_projects/Mathematical_Calculator.py", line 66, in <module>
print(x + "+" + y + "=" + mathResult + ".") ; sleep(float(speed))
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Вот код, в котором появляется ошибка:
print("type in your addition problem with your x variable first. (x variable = your first number) CAUTION: This calculator only supports 2 numbers at the moment.") ; sleep(float(speed))
x = int(input())
print("Type in your y variable.") ; sleep(float(speed))
y = int(input())
mathResult = x + y
print(x + "+" + y + "=" + mathResult + ".") ; sleep(float(speed))