diff --git a/friend_functions.py b/friend_functions.py index aabdbaa..1e7535b 100644 --- a/friend_functions.py +++ b/friend_functions.py @@ -41,7 +41,13 @@ def count_favorite_colors(people, name): >>> count_favorite_colors(family, "Raphael Chambers") 1 """ - raise NotImplementedError() + for person in people: + if person["name"]== name: + colors = (person["favorite_colors"]) + return len(colors) + + else: + return "None" def people_who_like_color(people, color): """Returns a list containing only those people who like the given color.