class.pk 151 B

123456
  1. class Complex:
  2. def __init__(self, realpart, imagpart):
  3. self.r = realpart
  4. self.i = imagpart
  5. x = Complex(3.0, -4.5)
  6. assert x.r == 3.0