So i have my code and it doesnt add up numbers it just 1 + 1 = 11 not 2 or “3 +3 = 33” “5 + 1 = 51” and so on. How do i fix this
if input2 == "calculator":
print("1 = + , 2 = - , 3 = *, 4 = / ")
a = input("Type number ")
b = input("Type another number ")
x = input("Multiply,add....? ")
if x == "1":
print(a + b)
elif x == "2":
print(a - b)
elif x == "3":
print(a * b)
elif x == "4":
print(a / b)
other operations dont even work
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\atom\Computer.py", line 48, in <module>
print(a * b)
TypeError: can't multiply sequence by non-int of type 'str'
Process returned 1 (0x1) execution time : 8.750 s
Press any key to continue . . .