If21. The integer coordinates of a point on a plane are given. If the point coincides with the origin, output 0. If the point does not coincide with the origin but lies on the OX or OY axis, then output 1 or 2, respectively. If the point does not lie on the coordinate axes, output 3.

Solution in Python 3:

import random

for i in range(0,5):
x,y = [random.randrange(-3, 4) for i in range(0,2)]
print("\nТочка (x,y): ({0},{1})".format(x,y))
if x == 0 and y == 0:
print("0. Coincides with the origin of coordinates")
elif y == 0:
print("1. Lies on the OX axis")
elif x == 0:
print("2. Lies on the OY axis")
else:
print("3. Does not lie on coordinate axes")