for the fifth function - I used the previous function to help me code the count by using the len command that I used for the first function! Easy way to return the number of people who like a given color

This commit is contained in:
erbrown
2025-12-13 20:49:39 -05:00
parent f79959c5a4
commit 0e0962c53d
2 changed files with 11 additions and 10 deletions

View File

@@ -78,7 +78,8 @@ def count_people_who_like_color(people, color):
>>> count_people_who_like_color(family, "orange")
1
"""
raise NotImplementedError()
return len(people_who_like_color(people, color))
def get_color_dict(people):
"""Returns a dict showing how many people like each color.