From e4cb952f6f8407bba4e6c142b3f974f763badf7d Mon Sep 17 00:00:00 2001 From: Chris Mekelburg Date: Sun, 13 Oct 2024 14:49:07 -0400 Subject: [PATCH] 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. --- friend_functions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/friend_functions.py b/friend_functions.py index faf7e09..aabdbaa 100644 --- a/friend_functions.py +++ b/friend_functions.py @@ -27,7 +27,11 @@ def get_email(people, name): >>> get_email(friends, "Tad Winters") None """ - raise NotImplementedError() + for person in people: + if person["name"] == name: + return person["email"] + else: + return "None" def count_favorite_colors(people, name): """Returns the number of colors liked by the named person. If there is no such person, returns None.