Create a function that determines whether four coordinates properly create a rectangle. A rectangle has 4 sides and has 90 degrees for each angle. Coordinates are given as strings containing an x- and a y- coordinate: "(x, y)".
For this problem, assume none of the rectangles are tilted.
is_rectangle(["(0, 0)", "(0, 1)", "(1, 0)", "(1,1)"]) ➞ True
is_rectangle(["(-4, 3)", "(4, 3)", "(4, -3)", "(-4, -3)"]) ➞ True
is_rectangle(["(0, 0)", "(0, 1)"]) ➞ False
# A line is not a rectangle!
is_rectangle(["(0, 0)", "(0, 1)", "(1, 0)"]) ➞ False
# Neither is a triangle!
is_rectangle(["(0, 0)", "(9, 0)", "(7, 5)", "(16, 5)"]) ➞ False
# A parallelogram, but not a rectangle!
False.