generated from mwc/lab_weather
Fixed some more things with the other functions, still have to do the
get_color_dict. I'm not sure why get_color_dict is not working, but I think that it is not adding to the frequency when it encounters a second person with the color in their favorites, because it is showing 1 instead of 2 for some.
This commit is contained in:
parent
0119963833
commit
010dd82161
|
@ -108,8 +108,12 @@ def get_color_dict(people):
|
|||
"orange": 1,
|
||||
}
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
color_dict = {}
|
||||
freq = 0
|
||||
for person in people:
|
||||
for fav_color in person["favorite_colors"]:
|
||||
color_dict[fav_color] = freq + 1
|
||||
return color_dict
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue