Implemented email lookup.

This commit is contained in:
tgaeta
2025-10-08 13:05:57 -04:00
parent ed1430803b
commit eee80567e4
2 changed files with 4 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -27,7 +27,10 @@ def get_email(people, name):
>>> get_email(friends, "Tad Winters") >>> get_email(friends, "Tad Winters")
None None
""" """
raise NotImplementedError() for person in people:
if person["name"] == name:
return person["email"]
return None
def count_favorite_colors(people, name): def count_favorite_colors(people, name):
"""Returns the number of colors liked by the named person. If there is no such person, returns None. """Returns the number of colors liked by the named person. If there is no such person, returns None.