Completed string calculator

completed exercise while following instructor
will use as a reference