Description:
Several functions in calculator.py are missing.
Please implement:
Basic operations (add, subtract, multiply, divide)
Memory functions (store_in_memory, etc.)
Variable assignment and expression evaluation
Factorial, sqrt, power
Make sure to handle divide-by-zero and invalid inputs gracefully.
Include simple unit tests in a new file test_calculator.py.