text: """
  Class Encore CIS 211 w/ Joseph
  horror_skeleton.py
  Author: Joseph Goh
  Updated: 05/20/2021
  """
  
  from typing import List
  
  
  class Horror:
      """yikes"""
      def __init__(self, name: str, spookiness: int, appearances: int):
          self.name = name                # Name of the horror
          self.spookiness = spookiness    # Spookiness rated from one to ten
          self.appearances = appearances  # Number of movies it appears in
  
      def __str__(self):
          return f"Horror({self.name}: {self.spookiness} spook, {self.appearances} appearances)"
  
      def __repr__(self):
          return f"Horror({self.name})"
  
  
  class Comparison:
      """Abstract base class for all Comparison types."""
      def compare(self, h1: Horror, h2: Horror) -> bool:
          raise NotImplementedError("Concrete subclass must implement compare method!")
  
  
  class Spookier(Comparison):
      def compare(self, h1: Horror, h2: Horror) -> bool:
          """Return True if h1 has higher spookiness. Else, return False."""
          # FIXME
  
  
  class MoreTotalSpooks(Comparison):
      def compare(self, h1: Horror, h2: Horror) -> bool:
          """Return True if h1 has higher total spooks (spookiness times appearances) than h2. Else, return False."""
          # FIXME
  
  
  class HorrorList(List[Horror]):
      def best(self, comparison: Comparison) -> Horror:
          """
          Return the Horror that is the best according to the comparison given.
          If you're stuck, you may want to recall how you would implement a maximum finding algorithm.
          """
          # FIXME
  
      def drop_pg_horrors(self) -> "HorrorList":
          """
          Return a HorrorList with only the Horror objects whose spookiness is greater than the average spookiness of all
          Horror objects in self.
          You'll want to make two passes through the list (which is self). The first to find the average, and the second
          to build a list with better than average Horror objects.
          """
          # FIXME
  
  
  # Example code
  horror_li = HorrorList()
  horror_li.append(Horror("Freddy Krueger", 6, 9))
  horror_li.append(Horror("Pennywise", 8, 3))
  horror_li.append(Horror("Any antagonist from Courage the Cowardly Dog", 5, 52))
  horror_li.append(Horror("The cats from Cats (2019)", 11, 1))
  
  # Horror(The cats from Cats: 11 spook, 1 appearances)
  print(horror_li.best(Spookier()))
  
  # Horror(Any antagonist from Courage the Cowardly Dog: 5 spook, 52 appearances)
  print(horror_li.best(MoreTotalSpooks()))
  
  # [Horror(Pennywise), Horror(The cats from Cats (2019))]
  print(horror_li.drop_pg_horrors())
  