This project implements a simple calculator using Python's turtle graphics library. The calculator allows users to perform basic arithmetic operations including addition, subtraction, multiplication, and division. The results are displayed using the turtle graphics interface.
- Input two numbers via dialog boxes.
- Choose an arithmetic operation (Addition, Subtraction, Multiplication, Division).
- Display the result on the turtle graphics screen.
- Handle division by zero gracefully with an error message.
To run this project, you need to have Python installed on your system. The turtle module is included with the standard Python library, so no additional installation is required.
-
Clone the Repository:
git clone https://github.com/Aniket-Gupta-Tech-2005/Simple-Calculator-Using-python.git cd simple-calculator -
Run the Program:
python calculator.py
-
Follow the Prompts:
- Enter two numbers when prompted.
- Select the operation you wish to perform by entering the corresponding number or symbol.
- The result will be displayed on the turtle graphics window.
calculate(): Function to perform the calculation based on user input and display the result using turtle graphics.turtle.setup(): Configures the turtle graphics window.turtle.numinput(): Prompts the user to enter numbers.turtle.textinput(): Prompts the user to choose an operation.turtle.write(): Displays the result on the screen.
Feel free to open issues or submit pull requests if you have suggestions or improvements.