Problem Solving: Quadrilateral Shapes

Let's write a program to identify the different quadrilateral shapes using the given coordinates.

In this lesson, we’ll devise a solution to write a program that takes coordinates and identifies the geometric shape.

So let’s get to it!

Quadrilateral shapes

A quadrilateral is a four-sided two-dimensional shape. If a quadrilateral has four equal sides and every two adjacent sides are at right angles to each other, we will call it a square. If a quadrilateral has opposite equal sides, but differently sized adjacent sides, and every two adjacent sides are right-angled, we call it a rectangle.

Rhombus is a quadrilateral with equal sides. The only difference between a rhombus and a square is that in a rhombus, the angles are not right angles.

Similarly, parallelogram is similar to a rectangle (it has equal opposite sides), but none of the angles are right angles.

Get hands-on with 1200+ tech skills courses.