Calculator assignment (assignment 1-3) from Stanford cs193 class