generated from mwc/lab_weather
Function 2 working
I think I got the get_email function working here (I have 2 dots) but am still getting one F as the result of the testing section. If this function still has an error, I can come back and fix it before completing checkpoint 1.
This commit is contained in:
parent
dd1fb7d3d3
commit
e4cb952f6f
|
@ -27,7 +27,11 @@ def get_email(people, name):
|
||||||
>>> get_email(friends, "Tad Winters")
|
>>> get_email(friends, "Tad Winters")
|
||||||
None
|
None
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
for person in people:
|
||||||
|
if person["name"] == name:
|
||||||
|
return person["email"]
|
||||||
|
else:
|
||||||
|
return "None"
|
||||||
|
|
||||||
def count_favorite_colors(people, name):
|
def count_favorite_colors(people, name):
|
||||||
"""Returns the number of colors liked by the named person. If there is no such person, returns None.
|
"""Returns the number of colors liked by the named person. If there is no such person, returns None.
|
||||||
|
|
Loading…
Reference in New Issue