A simple calculator built using Python's match-case statement introduced in Python 3.10.
This calculator performs basic arithmetic operations using a command-line interface and demonstrates the use of structural pattern matching in Python.
- Addition
- Subtraction
- Multiplication
- Division
- User-friendly terminal interaction
- Built using Python
match-case
- Python 3.10+
match operator:
case '+':
print(a + b)
case '-':
print(a - b)
case '*':
print(a * b)
case '/':
print(a / b)Clone the repository:
git clone https://github.com/your-username/match-case-calculator.gitMove into the project folder:
cd match-case-calculatorRun the program:
python calculator.pyThis project was created to practice:
- Python basics
- Structural pattern matching
- Conditional execution
- User input handling
- CLI application development
Utsab