Simulates the core logic of a calculator, showing how user input is built into an expression string and evaluated.