diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..a7daff5 Binary files /dev/null and b/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_chocolates/__pycache__/__init__.cpython-36.pyc b/q01_chocolates/__pycache__/__init__.cpython-36.pyc index fa1b5bd..3360b4b 100644 Binary files a/q01_chocolates/__pycache__/__init__.cpython-36.pyc and b/q01_chocolates/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_chocolates/__pycache__/build.cpython-36.pyc b/q01_chocolates/__pycache__/build.cpython-36.pyc index 0e64e4d..eb68881 100644 Binary files a/q01_chocolates/__pycache__/build.cpython-36.pyc and b/q01_chocolates/__pycache__/build.cpython-36.pyc differ diff --git a/q01_chocolates/build.py b/q01_chocolates/build.py index ed96c95..f896ebb 100644 --- a/q01_chocolates/build.py +++ b/q01_chocolates/build.py @@ -1,12 +1,21 @@ +# %load q01_chocolates/build.py -input_list = [] +input_list = [3,4,5,8,9,10] # Write your solution here: +#Actual question is to def q01_chocolates(my_list=input_list): - - + y = [] + z=0 + for v in my_list: + if v%2==1: + z+=v + y.append(z) + return y + +q01_chocolates(input_list) diff --git a/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc b/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc index 7016538..3e8287e 100644 Binary files a/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc and b/q01_chocolates/tests/__pycache__/__init__.cpython-36.pyc differ 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 e3c45ac..406356a 100644 Binary files a/q01_chocolates/tests/__pycache__/test_q01_chocolates.cpython-36.pyc and b/q01_chocolates/tests/__pycache__/test_q01_chocolates.cpython-36.pyc differ