Exercise 3: calculator