I am new to Python and I have one question about the same topic. I have this simple calculator but the thing is I want all inputs to be on a single line. For example to have print "Enter Numbers" and to be able to enter in the same line like num1-operator-num2 (5+2) and on the next line to have the print "The result is:" Can anyone help with this one? :D
num1 = float(input("Enter First Number:"))
op = input("Enter operator: ")
num2 = float(input("Enter Second Number:"))
if op == "+":
print(num1 + num2)
elif op == "-":
print(num1 - num2)
elif op == "*":
print(num1 * num2)
elif op == "/":
print(num1 / num2)