This project is a Python-based scientific calculator that includes a parsing algorithm called a tokenizer and a postfix evaluator. These algorithms are fundamental for processing mathematical expressions and are the foundation for the calculator's functionality.
To use this calculator, follow these steps:
-
Clone the repository to your local machine: git clone https://github.com/awaisAhmed19/scientific-calculator.git
-
Navigate to the project directory:
cd scientific-calculator Run the calculator:
python calculator.py
The calculator supports various mathematical operations, including addition, subtraction, multiplication, division, and exponentiation. Enter expressions in infix notation, and the calculator will parse and evaluate them using postfix notation.
Example usage:
Enter an expression: 2 + 3 * 4 Result: 14
- Tokenizer for parsing mathematical expressions.
- Postfix evaluator for evaluating expressions.
- Support for basic arithmetic operations.
- User-friendly command-line interface.
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- install and setup VScode and git
- Fork the repository.
- Create a new branch for your feature or 3. bug fix: git checkout -b feature-name.
- Make your changes and commit them: git commit -m "Add feature-name".
- Push your changes to your fork: git push origin feature-name.
- Open a pull request on the main repository.