From 92b1d13294362c51fa81844ef315605b4843f753 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Oct 2024 22:21:10 -0400 Subject: [PATCH] I got people_who_like_color to work (I think). I don't know if these are really working because it seems like there are more E and F left than functions to finish... I was assuming when there was a new . in the EEEEEEEEE that meant I got a function to work. I am hoping that multiple E and F get resolved when I finish the last one I guess. --- friend_functions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/friend_functions.py b/friend_functions.py index c4d1fe7..6037afe 100644 --- a/friend_functions.py +++ b/friend_functions.py @@ -71,7 +71,11 @@ def people_who_like_color(people, color): >>> people_who_like_color(family, "indigo") [] """ - raise NotImplementedError() + who_likes_this_color = [] + for person in people: + if color in person["favorite_colors"]: + who_likes_this_color.append(person) + return who_likes_this_color def count_people_who_like_color(people, color): """Returns the number of people who like a given color.