From ed1430803b05042412c1193b3f665299a9380f1a Mon Sep 17 00:00:00 2001 From: tgaeta Date: Wed, 8 Oct 2025 12:54:48 -0400 Subject: [PATCH] Implemented function to count people Honestly I don't like this lesson on dictionaries! This is a perfect use case for object-oriented programming; dictionaries are just lookup tables. I think it makes more sense to teach dicts in the context of price lookups, or passwords, or something that has more structure than just a place to put names variables. --- .DS_Store | Bin 0 -> 6148 bytes friend_functions.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..76cb8e38dba8942e6c9a497e638c3d98e56aca16 GIT binary patch literal 6148 zcmeHKy-or_5S~R6F<1~|VY#)1kyzRsV(jiMj2)FvVNZMu8y|o- z@SB|t-f~`JVT_p}v)|q9%-(n3U2a$+GR=9vPE;eJ3Y@XDgW((FdG?%@d}J4Bc#ZL( z-s&ZjX)aR(e^mi~c4a!E0gY%DKELHVS_9!!u z=DSS~VA!FVV|pL*+`r0aWceNT-|to@PP2`5vb>73LO#dLM@oM|}3StIkq!cKn#&0oo+uM{xl zxD_{XOTM?}ZjO7cg}32soR<*TAHba>> count_people(family) @@ -17,7 +17,7 @@ def count_people(people): >>> count_people(friends) 10 """ - raise NotImplementedError() + return len(people) def get_email(people, name): """Returns the named person's email address. If there is no such person, returns None.