Our problem is set on the planet of Lengaburu, the distant galaxy of Tara B. Our protagonists are King Arthur, Queen Margaret and their family.
King Arthur is the emperor of Lengaburu and has been ruling the planet for the last 350 years (they have long lives in Lengaburu!). Let’s write some code to get to know the family.
Write code to model out the King Arthur family tree so that: Given a ‘name’ and a ‘relationship’, you should output the people corresponding to the relationship in the order in which they are added to the family tree You should be able to add a child to any family in the tree through the mother
Names are unique
Complete unit tests: Did some test to show the familiarity with testing, and mocking, did not implement comprehensive tests, due to time limits.
Given that, I have tested this project on OSX, here are the requirements:
- python 3.8.2
The following will install virtual-env called env, install required packages and, runs tests:
./setup.sh
from MeetTheFamilyFolder folder, call:
source env/bin/activate
python main.py <test_file_name>