This is a basic calculator program written in Python that allows you to perform arithmetic operations on two input values. The supported operations are addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).
- Run the program by executing the
calculator.py
file. - Enter two numerical values separated by a space when prompted.
- Choose an operation by entering one of the supported operation symbols: +, -, *, /, or %.
- The program will display the result of the chosen operation on the provided values.
- The program prompts the user to input two numerical values, which are converted to floating-point numbers for accurate calculations.
- The user is asked to input an operation symbol.
- Based on the chosen operation, the program performs the corresponding calculation and displays the result.
Enter two values: 10 5
Enter the Operation (+, -, *, /, %): *
10.0 * 5.0 = 50.0
If an invalid operation symbol is provided, the program will display an error message and exit.
Enter two values: 8 3
Enter the Operation (+, -, *, /, %): #
Error: Invalid Operation
This calculator program is a simple demonstration and does not include advanced features such as parentheses, exponentiation, or complex mathematical functions.