A function to do basic arithmetic operations