create simble calc use python Simple Calculator Project
This program is a simple calculator written in Python. It can perform the following basic arithmetic operations:
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
How to use:
- Run the program: Save the code in a
.py
file and run it using thepython
command in the terminal. - Enter numbers: The program will ask you to enter two numbers. Make sure to enter valid numeric values (e.g., 10, 3.14).
- Choose the operation: After entering the two numbers, the program will ask you to enter the symbol for the operation you want to perform ( +, -, *, / ).
- View the result: The program will calculate the result and display it on the screen.
- Perform another operation (optional): The program will ask you after each operation if you want to perform another operation. Enter
y
to continue orn
to exit the program.
Notes:
- The program currently does not support exponents, roots, and other complex calculations.
- You cannot divide any number by zero. The program will display an error message if you try to do so.
Example:
Enter first number: 10
Enter operation type: +
Enter second number: 5
15.0
Do you want to perform another operation (y/n): y
Enter first number: 8
Enter operation type: /
Enter second number: 2
4.0
Do you want to perform another operation (y/n): n
Program exited
I hope this description helps you use the simple calculator!