Welcome to My Calculator! This simple calculator program allows you to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.
- User-Friendly Interface: The program provides a clear menu for selecting operations.
- Basic Arithmetic Operations: You can add, subtract, multiply, and divide two numbers.
- Error Handling: The program handles invalid input and division by zero gracefully.
- Continuation Prompt: Users can choose to perform additional calculations or exit the program.
- Python 3 installed on your machine.
- Clone the repository or copy the code into a Python file (e.g.,
main.py). - Open your terminal or command prompt.
- Navigate to the directory where your Python file is located.
- Run the program using the command:
python calculator.py
- When you run the program, you will be welcomed and presented with a menu of options.
- Enter your choice (1-5) to perform an operation or exit.
- If you choose to perform an operation, you will be prompted to enter two numbers.
- The program will display the result of the calculation.
- You can then choose to continue using the calculator or exit.
Welcome to Muhais' Calculator!
Simple Calculator
1. Add
2. Subtract
3. Multiply
4. Divide
5. Exit
Enter your choice (1-5): 1
Enter the first number: 10
Enter the second number: 5
Addition Result: 10.0 + 5.0 = 15.00
Do you want to continue using the calculator? (yes/no): yes
- If invalid numbers are entered, the program will prompt you to enter valid numbers.
- Division by zero will trigger an error message, preventing the operation from executing.
Feel free to fork the repository and make improvements or report any issues you find!