def main(): print("Welcome to the Simple Math Calculator!") print("Please choose an operation: +, -, *, /") # Get operation from the user operation = input("Enter operation: ") # Get two numbers from the user try: num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: ")) except ValueError: print("Invalid input! Please enter numeric values.") return # Perform the selected operation if operation == '+': result = num1 + num2 elif operation == '-': result = num1 - num2 elif operation == '*': result = num1 * num2 elif operation == '/': if num2 == 0: print("Error: Division by zero is not allowed!") return result = num1 / num2 else: print("Invalid operation! Please choose +, -, *, or /.") return # Display the result print(f"The result of {num1} {operation} {num2} is: {result}") # Call the main function if __name__ == "__main__": main()