From fe0c595b4bd3ca8df34f4fd526b6895a5e3d632e Mon Sep 17 00:00:00 2001 From: Cory Dean Chung Date: Mon, 14 Aug 2023 13:54:08 -0400 Subject: [PATCH] Checpoint 1, commit 1: Wrote count_people. I forgot I had to assign the variable before referencing it. When it didn't work at first, I poked through test_friend_functions.py to figure out what data was being used. I put from people import friends, family and count_people(family) into friend_functions.py and ran python friend_functions.py to see what the error was. --- friend_functions.py | 5 ++- friend_functions.pyc | Bin 0 -> 3350 bytes people.pyc | Bin 0 -> 1693 bytes poetry.lock | 73 ++++++++++++++++++++++++++----------------- 4 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 friend_functions.pyc create mode 100644 people.pyc diff --git a/friend_functions.py b/friend_functions.py index 6f5ecf7..f5757aa 100644 --- a/friend_functions.py +++ b/friend_functions.py @@ -17,7 +17,10 @@ def count_people(people): >>> count_people(friends) 10 """ - raise NotImplementedError() + counted = 0 + for person in people: + counted = counted + 1 + return counted def get_email(people, name): """Returns the named person's email address. If there is no such person, returns None. diff --git a/friend_functions.pyc b/friend_functions.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8507c16df629f53b98ba51acb52bb9ac46c72f82 GIT binary patch literal 3350 zcmcguUvDEd5O?~IB#;w-1&9}G5xO9i4XwmWg{q!%NE}E-${ni2sfwJnleOZtbGG+F zbXOq(AB}Io8}EDp-~%w@-R>q$N()j+w6kOHcs!op%y_o{?6m)qzwv~WzXrTd;BiMl zI3Yh1@*OaZz%&To3d|Pa+kx38d?zqFgzpAsm+(FExcdq$Pf*!*`SjuKJ^})|E*j+f z_sB~^9-hBWF1EM?i(PzZ=JBN*Ee?2dnnx0n^`YoQ>iDzx%BBUF} zU37(i3&^SQk1`0KOdx7sSZi!>#sIz%zXL>r7w#Cs7Hm`b<$V}9#Dg?%jocp~y@Fho z9EnlJI;!Lppd2lV)LFvyKjT=0+?YK#R(b(Zi~HP!>EQ};H>en}S;~Z>{gh#hiseQ5x)S#u<30q!{}B8e4gaJH{x@%3xPE~(m%+d3 zR0ByBN6w9fkOrL;GV|mdF!c~+x&>40LrgI~l zzVE?o4-LkKW+d!3MA;JM8rv6DwuVX=a{P!Mu2!BBuYZ02oWL_zo6RbVy3k{T}xLt zX!3>miu^?0@|2qHU09nH(_M8=-Kz)xZVl6rN2?ST=qQ5gl{upcj37nsy7njrTTsURX^vu@;L!roEjIYMO3Wjii!1)gC+E60=jVQ}o5p(Oc2ZA(FNnMI3&hd!+WA_q!5o%`WVQT6_s(Cia#Ld$QQ??z4R3S z;`>5w0V{OC;|?04)YrcK0m1SexiCU;PSA#pUK{;IB*VykgO7>9c1{YIOu%b?EIPC% zl+t65!Na&Fsx9_TQ|nF|YJrQRSWPj6loJbGCY@7t7*b>YjMfy#*g3MA`Kh>tC<&J> zSmX%$EysP5htw4(5RjjV;0?<>po}(nQyJvzrRk^A7sudqo~1{wD1_ojn3zUTMcmr|fBRt-htGfB{k0Or# zU}?wbfP6Rl0eKo|HfmvNTzz(BLL*O6