When you have animal1 and then you bring in animal2, they’ll become best friends. But if animal1 is cranky or very unfriendly and you bring in animal2, animal1 may think that they are mortal enemies for coming around them.

The fun part was figuring out what happens when you multiply animals!

litter = dog1 * dog2
litter
[<Dog name:'bob'>, <Dog name:'jill'>]

First I had to check if the two objects are the same species and if they are, then I generate a random number for the size of their littler. Then I loop over the range of the random number, creating a new instance of the parent’s class and returning all the instances in a list!

I’ve been working on this on the side for a day or two and I’ve had a blast. Check out a quick video from DevelopHerDevelopHim for a walk through the code below!

Check out my code on github and make your own cats, dogs, pandas, hamsters, rabbits, frogs, monkeys, mice and fish!

While I was working on this, I shared it with Sarah, a coworker. She found a really fun module that displays emoji that she thought that I would like. Thank so much much for sharing this with me!