generated from mwc/lab_weather
I wrote the code for the count_people function and I think it is
working. I used the list rules to count the number of dictionaries in the list.
This commit is contained in:
parent
39500b0cba
commit
077aa7070a
|
@ -17,7 +17,11 @@ def count_people(people):
|
||||||
>>> count_people(friends)
|
>>> count_people(friends)
|
||||||
10
|
10
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
count = 0
|
||||||
|
for person in people:
|
||||||
|
count = count + 1
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
def get_email(people, name):
|
def get_email(people, name):
|
||||||
"""Returns the named person's email address. If there is no such person, returns None.
|
"""Returns the named person's email address. If there is no such person, returns None.
|
||||||
|
|
Loading…
Reference in New Issue