There's a reason why coordinates are called an "ordered pair", and for every point (a, b) a is the x coordinate and b is the y coordinate. The calculations are correct, the way reporting them are not: the point should be (3.0) and (0,2) - in fact, all points on the x axis are of the form (p, 0) and all points on the y axis of the form (0,q)