Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Draw the line with 'x' which connects the given points.
If the points are diagonal, a rectangle instead of diagonal line should be drawn
Regarding the points being diagonal, how can we verify this for a rectangle?
For a square, i.e. if the points are diagonal, we can verify with this formula:
|𝑥1−𝑥2|=|𝑦1−𝑦2|
this wouldn't apply for a rectangle
This comment is hidden because it contains spoiler information about the solution