Answer the question
In order to leave comments, you need to log in
How to determine that three points satisfy the condition?
There are coordinates (x1, y1), (x2, y2), (x3, y3).
How to check the condition that all these three points are different, but at the same time they lie on the same straight line, either parallel to the abscissa axis, or parallel to the y-axis?
Answer the question
In order to leave comments, you need to log in
(x1 != x2 or y1 != y2) and # Первая точка не совпадает со второй и...
(x1 != x3 or y1 != y3) and # Первая точка не совпадает с третьей и...
(x2 != x3 or y2 != y3) and # Вторая точка не совпадаят с третьей и...
((x1 == x2 and x2 == x3) or # X-координаты всех точек равны или...
(y1 == y2 and y2 == y3)) # Y-координаты всех точек равны
On the same curve? Or in one line?
The points are different - compare coordinates
Parallel to the y-axis - so everyone will have the same x-coordinate
Parallel to the x-axis - so everyone will have the same y-coordinate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question