text: from abc import abstractmethod, ABC
  
  """ BEFORE """
  
  # class Duck(ABC):
  #     pass
  #
  #
  # class RubberDuck(Duck):
  #     @staticmethod
  #     def quack():
  #         return "Squeek"
  #
  #     @staticmethod
  #     def walk():
  #         """Rubber duck can walk only if you move it"""
  #         raise Exception('I cannot walk by myself')
  #
  #     @staticmethod
  #     def fly():
  #         """Rubber duck can fly only if you throw it"""
  #         raise Exception('I cannot fly by myself')
  #
  #
  # class RobotDuck(Duck):
  #     HEIGHT = 50
  #
  #     def __init__(self):
  #         self.height = 0
  #
  #     @staticmethod
  #     def quack():
  #         return 'Robotic quacking'
  #
  #     @staticmethod
  #     def walk():
  #         return 'Robotic walking'
  #
  #     def fly(self):
  #         """can only fly to specific height but
  #         when it reaches it starts landing automatically"""
  #         if self.height == RobotDuck.HEIGHT:
  #             self.land()
  #         else:
  #             self.height += 1
  #
  #     def land(self):
  #         self.height = 0
  
  
  """ AFTER CORRECTION"""
  
  
  class Duck(ABC):
      @staticmethod
      @abstractmethod
      def quack():
          return "Squeek"
  
  
  class RubberDuck(Duck):
      @staticmethod
      def quack():
          return "Squeek"
  
  
  class RobotDuck(Duck):
      HEIGHT = 50
  
      def __init__(self):
          self.height = 0
  
      @staticmethod
      def quack():
          return 'Robotic quacking'
  
      @staticmethod
      def walk():
          return 'Robotic walking'
  
      def fly(self):
          """can only fly to specific height but
          when it reaches it starts landing automatically"""
          if self.height == RobotDuck.HEIGHT:
              self.land()
          else:
              self.height += 1
  
      def land(self):
          self.height = 0
  
  
  class LiveDuck(RobotDuck, Duck):
      @staticmethod
      def quack():
          return 'quacking'
  
      @staticmethod
      def walk():
          return 'walking'
  
      def fly(self):
          return 'flying'
  
      @staticmethod
      def eat():
          return 'eating'
  
  duck = RobotDuck()
  print(duck.fly())
  