I'm trying to make a simple calculator in Python. I'm asking for 2 numbers and then operating based on the operational character they choose. However, the variable is turned into a string type so I can't add, subtract, etc.
This is the code:
a = input("Enter first number")
print(a)
b = input("Enter second number")
print(b)
op = input("Choose operation by entering +, -, x, or /")
if(op == "+"):
print(a+b)
elif(op == "-"):
print(a-b)
elif(op == "x"):
print(a*b)
elif(op == "/"):
print(a/b)
else:
print("Sorry; input the correct operational character")