First working iteration of tip_calculator with try block