An advanced calculator built using Python and Tkinter. This calculator supports basic arithmetic operations, scientific functions, memory operations, and theme customization. It also includes a history panel to track previous calculations.
- Basic Arithmetic: Addition, subtraction, multiplication, and division.
- Scientific Functions: Square root (
โ), exponents (^), logarithms (log,ln), and trigonometric functions (sin,cos,tan). - Memory Operations:
M+,M-,MR,MCfor storing and recalling values. - History Panel: Displays previous calculations for easy reference.
- Theme Customization: Switch between light and dark themes.
- Keyboard Support: Use the keyboard for input (numbers, operators, and special keys like
Enter,Backspace,Esc). - Error Handling: Displays user-friendly error messages for invalid expressions.
- Closing Braces: Supports parentheses
()for complex expressions.
-
Prerequisites:
- Python 3.x installed on your system.
- Tkinter (usually comes pre-installed with Python).
-
Clone the Repository:
git clone https://github.com/your-username/Advanced-calculator.git cd Advanced-calculator -
Run the Calculator:
python Advanced_calculator.py
-
Buttons:
- Click on the buttons to input numbers, operators, and functions.
- Use the
Cbutton to clear the input. - Use the
=button to evaluate the expression. - Use the
Themebutton to switch between light and dark themes.
-
Keyboard:
- Use the keyboard to input numbers, operators, and parentheses.
- Press
Enterto evaluate the expression. - Press
Backspaceto delete the last character. - Press
Escto clear the input.
- M+: Add the current value to memory.
- M-: Subtract the current value from memory.
- MR: Recall the value stored in memory.
- MC: Clear the memory.
- The history panel displays all previous calculations.
- Click on a calculation to reuse it.
-
Advanced_calculator.py:- Main script containing the calculator logic.
- Handles button clicks, keyboard input, and theme switching.
-
Dependencies:
tkinter: For the GUI.math: For scientific functions.
Contributions are welcome! If you'd like to add new features or improve the calculator, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Built with โค๏ธ using Python and Tkinter.
- Inspired by modern calculator apps.
For questions or feedback, feel free to reach out:
- Aaditya Jauhari
- Email: aadityajauhari01@gmail.com
- GitHub: https://github.com/ProblemShooter
Enjoy using the Advanced Calculator! ๐
Let me know if you need further assistance! ๐
