From 44ea5472ae57ed977dd0614515def66a2811950c Mon Sep 17 00:00:00 2001 From: Devil27 Date: Sat, 29 Sep 2018 09:40:17 +0000 Subject: [PATCH] Done --- __pycache__/__init__.cpython-36.pyc | Bin 0 -> 161 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 179 -> 176 bytes .../__pycache__/build.cpython-36.pyc | Bin 463 -> 396 bytes q01_chocolates/build.py | 11 +++++++++-- .../tests/__pycache__/__init__.cpython-36.pyc | Bin 185 -> 182 bytes .../test_q01_chocolates.cpython-36.pyc | Bin 1762 -> 1759 bytes 6 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 __pycache__/__init__.cpython-36.pyc diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8be54dbb6409f3d23dfa532fd9f5f36802a643da GIT binary patch literal 161 zcmXr!<>j(-TOZBHz`*brh~WSv-~hzMEI=ZKA(%mv(QhR~5l9$8{PNS!$j?pHcS$YF z%rP?856>^kE-pw+PSsD&Pf68JD@sf*Nz94QNKDR7Eh%*jd3 kOHYkA){l?R%*!l^kJl@xyv1RYo1apelWGUDrx=JC0NU#*%m4rY literal 0 HcmV?d00001 diff --git a/q01_chocolates/__pycache__/__init__.cpython-36.pyc b/q01_chocolates/__pycache__/__init__.cpython-36.pyc index fa1b5bddbc8c351ed512c69f150537017faac69f..5811fedaab89e8d5464b10a4682c300603a53430 100644 GIT binary patch delta 49 zcmdnYxPg(wn3tE!&TW14L=JP=SpAIr+*Ey+)UwPRBXj-m{G#mQg2d!h{p9?V)QRyS E0BM>J?EnA( delta 52 zcmdnMxS5f|n3tC;ZO^Nyi5%t%3HllNxvBbzNg0{?F8SqoIr)hx#rheE$=RtzMTvRY H6JtUE$RrYa diff --git a/q01_chocolates/__pycache__/build.cpython-36.pyc b/q01_chocolates/__pycache__/build.cpython-36.pyc index 0e64e4de4917d97841402cb2a25e65b19520617e..f320650627d9da6a48c55cbb3d21d7f2993ebc1f 100644 GIT binary patch delta 217 zcmX@l+{4Ue%*)Fa?y)}l6T?I<`+8;u1_oy!F17#?DU7v@=?t|@68hw=zB_v$*6Ib8%_zEym(oj1?;xia3DEe#u7ZXXNLm>bsxbtTWfvDDCa3Br=clAjR$=rL;RLEH<^vK8j4VLN#mK|RF}aJ;ikk%_0kV;W6#&>_ BG3)>U delta 283 zcmeBSKF`c$%*)HAdFEAA2IE97`+61z1_oy!E=~awDU7v@=?t|@6=5X|C5$x;&5X^A zE)215wahgPHO!I>DNJHOHQ7u>W;IM%Of^7RMutK$6gg%_h8mzwkZN;=T1I4b;S4oQ z!3>(relLMmF}!2~5}Gm0w^)l3^U_mqG3TV_-C|2DC`ipq(PW8Y&#jEl$t*6p#axz{ z6UCL5nU|OY5n#+*$xy@r)ch+}KO;XkRX;H)BU9fczdSD|KQX0PKO-?YJGBUCX!gXX mei9&s#X>-Wfr*8Yg-M7}fRTp@h$p)Fhp4Z diff --git a/q01_chocolates/build.py b/q01_chocolates/build.py index ed96c95..de48da4 100644 --- a/q01_chocolates/build.py +++ b/q01_chocolates/build.py @@ -1,3 +1,4 @@ +# %load q01_chocolates/build.py input_list = [] @@ -5,8 +6,14 @@ # Write your solution here: -def q01_chocolates(my_list=input_list): - +def q01_chocolates(my_list = input_list): + sum=0 + s=[] + for x in my_list: + if x%2 == 1: + sum+=x + s.append(sum) + return s diff --git a/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc b/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc index 701653826940ef168f2717fd45f0e007bf3a5eb7..b431482186ec03947921e32b0a525d6c86f5a8b7 100644 GIT binary patch delta 49 zcmdnVxQ&s+n3tE!$!&e~L=JP=Wc`f%+*Ey+)UwPRBXj-m{G#mQg2d!h{p9?V)QRy? E0Bt}J2><{9 delta 52 zcmdnSxRa5?n3tEUaL=o#i5%t%Y5E!YxvBbzNg0{?F8SqoIr)hx#rheE$=RtzMTvRY H6Jw$P%{daC diff --git a/q01_chocolates/tests/__pycache__/test_q01_chocolates.cpython-36.pyc b/q01_chocolates/tests/__pycache__/test_q01_chocolates.cpython-36.pyc index e3c45ac6acc433a697364049e9f0d803d75e0d39..2cdaa01b57f06e586327a80c9bdba47ca673bfd0 100644 GIT binary patch delta 52 zcmaFFd!LuXn3tE!$!&e~Mh;0P**yJ>{M=N1m(;S%93yl6@cg3e;)2BFRQ=@ql+?|R HObb~6sY4Lc delta 55 zcmcc5`-qprn3tDJ^USNLjU19p3WfR^`MIh3iAfom`Y!q9c{%xsDaHC3iOJciMMa5u L*_-W{7P0^U2AvZx