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.
This commit is contained in:
root 2024-10-13 22:21:10 -04:00
parent 2dc845fd63
commit 92b1d13294
1 changed files with 5 additions and 1 deletions

View File

@ -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.