I'm writing a class that is supposed to represent a parallelogram, the attributes are sideAB, sideDA and angleA, angleA has 90 as its default value the default value of sideDA is supposed to be the same as sideAB, I'm not sure how to implement this. This is what I tried
class Quad( object ):
def __init__( self, AB, DA=AB, A=90 ):
self.sideAB = AB
self.sideDA = DA
self.angleA = A
I get the error: name 'AB' is not defined, which makes sense. Any help would be appreciated
B _____C
A|_____|D
tried to draw the sides, I hope is helpful