input: Write a function to create a class in Python to represent a complex number. The class should have methods to initialize the complex number with real and imaginary parts and to return the complex number as a string in the form "(real + imaginaryi)".
  
  class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
          
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)
  
  assert str(ComplexNumber(2, 3)) == "(2 + 3i)"
  assert str(ComplexNumber(-1, -5)) == "(-1 + -5i)"
  assert str(ComplexNumber(0, 0)) == "(0 + 0i)"
  assert str(ComplexNumber(4.5, -2.3)) == "(4.5 + -2.3i)"
  assert str(ComplexNumber(1, 0)) == "(1 + 0i)"
output: class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
          
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)