class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []


    def add_occupant(self, person):
        if len(self.persons) < self.max_persons:
            self.persons.append(person)
        else:
            return "Room is at full capacity"

class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []

    def add_occupant(self, person):
        if len(self.persons) < self.max_persons:
            self.persons.append(person)
            print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
        else:
            raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")

Add Error statement to add_occupant method for when max capacity is reached
Add Error statement to add_occupant method for when max capacity is reached

  class Room(object):
      def __init__(self, room_name, room_type, max_persons):
          self.room_name = room_name
          self.room_type = room_type
          self.max_persons = max_persons
          self.persons = []
  
- 
      def add_occupant(self, person):
          if len(self.persons) < self.max_persons:
              self.persons.append(person)
+             print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
          else:
-             return "Room is at full capacity"
+             raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")
  
Add Error statement to add_occupant method for when max capacity is reached
## Code Before:
class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []


    def add_occupant(self, person):
        if len(self.persons) < self.max_persons:
            self.persons.append(person)
        else:
            return "Room is at full capacity"

## Instruction:
Add Error statement to add_occupant method for when max capacity is reached
## Code After:
class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []

    def add_occupant(self, person):
        if len(self.persons) < self.max_persons:
            self.persons.append(person)
            print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
        else:
            raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")
