This is a simple implementation of an expression evaluator that can handle basic arithmetic operations. It can convert infix expressions to postfix notation and then evaluate the postfix expression to obtain the result. The implementation also includes a check for balanced parentheses in the input expression. It utilizes a stack data structure to achieve this.
- Balanced Parentheses Check: Verifies if the input expression has balanced parentheses.
- Infix to Postfix Conversion: Converts mathematical expressions from infix notation to postfix notation.
- Postfix Expression Evaluation: Evaluates postfix expressions containing basic arithmetic operations (+, -, *, /).
# Example Usage
result = myeval('9+8-3*(12-3)')
print("Result:", result) # Result: -10.0
If you have any questions, suggestions, or would like to connect, please feel free to reach out.
- Name : Sharun Ashwanth K V
- Email : sharunashwanth03@gmail.com
- LinkedIn : sharunashwanth