solution to calculator assignment of TeaLeaf Course 1