# Help needed with Animal Shelter coding assignment - failing multiple tests

**URL:** <https://discuss.python.org/t/help-needed-with-animal-shelter-coding-assignment-failing-multiple-tests/25740>\
**Category:** Python Help\
**Created:** [April 12, 2023, 11:42pm UTC](https://discuss.python.org/t/help-needed-with-animal-shelter-coding-assignment-failing-multiple-tests/25740 "2023-04-12T23:42:14Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Fusion9334](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/fusion9334/32/12025_2.png) [@Fusion9334](https://discuss.python.org/u/Fusion9334)\
**Post date:** [April 13, 2023, 1:52pm UTC](https://discuss.python.org/t/help-needed-with-animal-shelter-coding-assignment-failing-multiple-tests/25740/6 "2023-04-13T13:52:17Z")

</div>

From the given code, it seems that you are missing the implementations for the doesAnimalExist, GetSpecies, and removeSpecies methods in your AnimalShelter class. I’ll provide you with the missing implementations for these methods.

1. `doesAnimalExist` method:

pythonCopy code

```auto
def doesAnimalExist(self, animal):
    if animal is None or animal.species is None:
        return False
    species = animal.species.upper()
    if species in self.AnimalDictionary:
        return animal in self.AnimalDictionary[species]
    return False

```

1. `GetSpecies` method:

pythonCopy code

```auto
def GetSpecies(self, species):
    if species is None:
        return None
    species = species.upper()
    if species in self.AnimalDictionary:
        return '\n'.join([animal.toString() for animal in self.AnimalDictionary[species]])
    return None

```

1. `removeSpecies` method:

pythonCopy code

```auto
def removeSpecies(self, species):
    if species is None:
        return False
    species = species.upper()
    if species in self.AnimalDictionary:
        del self.AnimalDictionary[species]
        return True
    return False

```

Add these methods to your AnimalShelter class and then rerun your tests.

---

_[View the full topic](https://discuss.python.org/t/help-needed-with-animal-shelter-coding-assignment-failing-multiple-tests/25740)._
