first = float(input("First: ")) operator = input("Operator: ") second = float(input("Second: ")) if operator == "+": print(first + second) elif operator == "-": print(first - second) elif operator == "*": print(first * second) elif operator == "/": print(first / second) else: print("invalid operator")