Commit f213035d authored by Temujin's avatar Temujin

FamilyTree and Person classes added.

parent e41be62a
"""Family Tree project for CSCI 30."""
from collections import defaultdict
class FamilyTree:
"""A family tree."""
def __init__(self, root):
self.family_tree = defaultdict([None, None])
self.family_tree[root] = [None, None]
pass
def get_parent(self, name):
class Person:
"""A person."""
def __init__(self, name, age, sex):
self.name = name
self.age = age
self.sex = sex
def get_name(self):
return self.name
def get_age(self):
return self.age
def get_sex(self):
return self.sex
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment