A downselect of python-code-disasters to support a New To Tech session on refactoring and code review for Gem City Tech.
You must have Python installed.
python calculator.py
- Extract the addition, subtraction, multiplication, and division functionality to their own function(s)
- Deduplicate the codebase
- Add exception handling and protection against the user entering invalid symbols or letters
- Add support for typing
2 * 5
instead of inputting the numbers and operators in separate stages - Migrate the codebase to a CLI library like click
- Add support for exponents and square roots
- Begin developing a unit test suite using pytest