I have written a program that will give a rectangle. I don't find the problem with your program. Can someone help me?
class Rectangle: def __init__ (self, point1: tuple=(0,0), point2: tuple=(1,1)): self.corner1 = point1 self.corner2 = point2 self.corner3 = (self.corner1[0], self.corner2[1]) self.corner4 = (self.corner2[0], self.corner1[1]) def __repr__ (self): list1=str([self.corner1, self.corner2, self.corner3, self.corner4]) return ("Rectangle's corners are : %s" %list1) def __str__ (self): return "dasdmck" def rotate (self, angel: float=90, measure: str="degree"): from math import pi from math import sin from math import cos list1=[self.corner1, self.corner2, self.corner3, self.corner4] list2=[] if measure == "rad": rad = angel else: rad= (angel * pi)/180 for i in list1: a = round(i[0] * cos(rad) + float(i[1]) * sin(rad), 3) b = round(i[1] * cos(rad) - float(i[0]) * sin(rad), 3) c=(a, b)